aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-29 10:42:50 +1030
committerAlan Modra <amodra@gmail.com>2022-10-29 15:23:58 +1030
commitc5d4b1b6046a77b04ad180d0974221371779599a (patch)
tree7a6efcff4e970afcbd9101d464f133ca8c03a894 /binutils
parent13de66dd346c4a4eddf62c3b97747d707c5ed78e (diff)
downloadgdb-c5d4b1b6046a77b04ad180d0974221371779599a.zip
gdb-c5d4b1b6046a77b04ad180d0974221371779599a.tar.gz
gdb-c5d4b1b6046a77b04ad180d0974221371779599a.tar.bz2
Fix small objcopy memory leak
* objcopy.c (copy_archive): Free l->name.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/objcopy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index d20aaef..03350ba 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3744,6 +3744,7 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
bfd_close (l->obfd);
unlink (l->name);
}
+ free ((char *) l->name);
next = l->next;
free (l);
}