projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Delete temporary string within demangler even in failure cases.
[deliverable/binutils-gdb.git]
/
libiberty
/
cp-demint.c
diff --git
a/libiberty/cp-demint.c
b/libiberty/cp-demint.c
index a0f2a7d81a1f8ec17fdb5feaf19f0b277da90125..1d1a77af748ba2485272db761fa4244e25b5e2e2 100644
(file)
--- a/
libiberty/cp-demint.c
+++ b/
libiberty/cp-demint.c
@@
-130,18
+130,18
@@
cplus_demangle_fill_component (struct demangle_component *p,
int
cplus_demangle_fill_builtin_type (struct demangle_component *p,
int
cplus_demangle_fill_builtin_type (struct demangle_component *p,
- const char *typename)
+ const char *type
_
name)
{
int len;
unsigned int i;
{
int len;
unsigned int i;
- if (p == NULL || typename == NULL)
+ if (p == NULL || type
_
name == NULL)
return 0;
return 0;
- len = strlen (typename);
+ len = strlen (type
_
name);
for (i = 0; i < D_BUILTIN_TYPE_COUNT; ++i)
{
if (len == cplus_demangle_builtin_types[i].len
for (i = 0; i < D_BUILTIN_TYPE_COUNT; ++i)
{
if (len == cplus_demangle_builtin_types[i].len
- && strcmp (typename, cplus_demangle_builtin_types[i].name) == 0)
+ && strcmp (type
_
name, cplus_demangle_builtin_types[i].name) == 0)
{
p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
p->u.s_builtin.type = &cplus_demangle_builtin_types[i];
{
p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
p->u.s_builtin.type = &cplus_demangle_builtin_types[i];
@@
-206,10
+206,8
@@
cplus_demangle_v3_components (const char *mangled, int options, void **mem)
malloc (di.num_subs * sizeof (struct demangle_component *)));
if (di.comps == NULL || di.subs == NULL)
{
malloc (di.num_subs * sizeof (struct demangle_component *)));
if (di.comps == NULL || di.subs == NULL)
{
- if (di.comps != NULL)
- free (di.comps);
- if (di.subs != NULL)
- free (di.subs);
+ free (di.comps);
+ free (di.subs);
return NULL;
}
return NULL;
}
This page took
0.024755 seconds
and
4
git commands to generate.