Replace "if (x) free (x)" with "free (x)", gprof

* utils.c (print_name_only): Free demangled without checking
	first for non-NULL.
This commit is contained in:
Alan Modra 2020-05-20 22:49:51 +09:30
parent 9fbb53c7c8
commit 3d45296946
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2020-05-21 Alan Modra <amodra@gmail.com>
* utils.c (print_name_only): Free demangled without checking
first for non-NULL.
2020-05-18 Nick Clifton <nickc@redhat.com>
* po/es.po: Update Spanish translation.

View File

@ -85,10 +85,7 @@ print_name_only (Sym *self)
printf ("%s", buf);
size += strlen (buf);
}
if (demangled)
{
free (demangled);
}
free (demangled);
DBG (DFNDEBUG, printf ("{%d} ", self->cg.top_order));
DBG (PROPDEBUG, printf ("%4.0f%% ", 100.0 * self->cg.prop.fract));
}