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

* addr2line.c: Replace "if (x) free (x)" with "free (x)" throughout.
	* dlltool.c: Likewise.
	* elfcomm.c: Likewise.
	* rddbg.c: Likewise.
	* readelf.c: Likewise.
	* stabs.c: Likewise.
	* windmc.c: Likewise.
	* windres.c: Likewise.
	* wrstabs.c: Likewise.
This commit is contained in:
Alan Modra
2020-05-20 22:48:41 +09:30
parent c95949892f
commit 9db70fc365
10 changed files with 92 additions and 176 deletions

View File

@ -1253,8 +1253,7 @@ def_import (const char *app_name, const char *module, const char *dllext,
append_import (application_name, module, ord_val, its_name);
if (buf)
free (buf);
free (buf);
}
void
@ -1335,7 +1334,7 @@ run (const char *what, char *args)
pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base,
&errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH);
free(argv);
free (argv);
if (pid == -1)
{
@ -3388,15 +3387,8 @@ dll_name_list_free_contents (dll_name_list_node_type * entry)
if (entry)
{
if (entry->next)
{
dll_name_list_free_contents (entry->next);
entry->next = NULL;
}
if (entry->dllname)
{
free (entry->dllname);
entry->dllname = NULL;
}
dll_name_list_free_contents (entry->next);
free (entry->dllname);
free (entry);
}
}