diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-20 22:48:41 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-21 10:45:33 +0930 |
commit | 9db70fc3656064555873332003d842b880ca470c (patch) | |
tree | d1aaec716012f043f5ba4aa0e43bf879a32be214 /binutils/elfcomm.c | |
parent | c95949892f6f1e2974a0fb8a5463d7b6432ac469 (diff) | |
download | gdb-9db70fc3656064555873332003d842b880ca470c.zip gdb-9db70fc3656064555873332003d842b880ca470c.tar.gz gdb-9db70fc3656064555873332003d842b880ca470c.tar.bz2 |
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.
Diffstat (limited to 'binutils/elfcomm.c')
-rw-r--r-- | binutils/elfcomm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c index 5ec4690..558afa7 100644 --- a/binutils/elfcomm.c +++ b/binutils/elfcomm.c @@ -744,14 +744,10 @@ setup_nested_archive (struct archive_info *nested_arch, void release_archive (struct archive_info * arch) { - if (arch->file_name != NULL) - free (arch->file_name); - if (arch->index_array != NULL) - free (arch->index_array); - if (arch->sym_table != NULL) - free (arch->sym_table); - if (arch->longnames != NULL) - free (arch->longnames); + free (arch->file_name); + free (arch->index_array); + free (arch->sym_table); + free (arch->longnames); } /* Get the name of an archive member from the current archive header. |