aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-20 22:50:49 +0930
committerAlan Modra <amodra@gmail.com>2020-05-21 10:45:33 +0930
commit5e2ab6125485bede5611187f2df4b26b04026b80 (patch)
treef3884cb27e8761b535ee38e63ebee33c5cdbfea4 /ld/lexsup.c
parent3d45296946ba5c0ff59c407029bee3f368cace00 (diff)
downloadgdb-5e2ab6125485bede5611187f2df4b26b04026b80.zip
gdb-5e2ab6125485bede5611187f2df4b26b04026b80.tar.gz
gdb-5e2ab6125485bede5611187f2df4b26b04026b80.tar.bz2
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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index c02041d..fe9526b 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -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':