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

* deffilep.y: Replace "if (x) free (x)" with "free (x)" thoughout.
	* emultempl/elf.em: Likewise.
	* emultempl/msp430.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/xtensaelf.em: Likewise.
	* ldelf.c: Likewise.
	* ldfile.c: Likewise.
	* ldmain.c: Likewise.
	* ldmisc.c: Likewise.
	* lexsup.c: Likewise.
	* pe-dll.c: Likewise.
This commit is contained in:
Alan Modra
2020-05-20 22:50:49 +09:30
parent 3d45296946
commit 5e2ab61254
14 changed files with 56 additions and 84 deletions

View File

@@ -1485,8 +1485,7 @@ parse_args (unsigned argc, char **argv)
case 'Y':
if (CONST_STRNEQ (optarg, "P,"))
optarg += 2;
if (default_dirlist != NULL)
free (default_dirlist);
free (default_dirlist);
default_dirlist = xstrdup (optarg);
break;
case 'y':