Print this page
libconv
@@ -72,11 +72,12 @@
nbp = namebuf;
nbe = namebuf + namebuf_sz;
for (i = 0; i < total_funcs; i++) {
- if ((p = conv_demangle_name(profsym[i].name)) == NULL)
+ p = conv_demangle_name(profsym[i].name);
+ if (p == profsym[i].name)
continue;
namelen = strlen(p);
if ((nbp + namelen + 1) > nbe) {
namebuf_sz += BUCKET_SZ;
@@ -95,10 +96,11 @@
(void) strcpy(nbp, p);
profsym[i].demangled_name = nbp;
nbp += namelen + 1;
cur_len += namelen + 1;
+ free((void *)p);
}
}
int
cmp_by_time(const void *arg1, const void *arg2)