From 5e2ab6125485bede5611187f2df4b26b04026b80 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 May 2020 22:50:49 +0930 Subject: 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. --- ld/pe-dll.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ld/pe-dll.c') diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 6050429..f72b658 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -891,12 +891,9 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info * e[j - 1].flag_constant |= e[i].flag_constant; e[j - 1].flag_noname |= e[i].flag_noname; e[j - 1].flag_data |= e[i].flag_data; - if (e[i].name) - free (e[i].name); - if (e[i].internal_name) - free (e[i].internal_name); - if (e[i].its_name) - free (e[i].its_name); + free (e[i].name); + free (e[i].internal_name); + free (e[i].its_name); } else { -- cgit v1.1