From c5d4b1b6046a77b04ad180d0974221371779599a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 29 Oct 2022 10:42:50 +1030 Subject: Fix small objcopy memory leak * objcopy.c (copy_archive): Free l->name. --- binutils/objcopy.c | 1 + 1 file changed, 1 insertion(+) (limited to 'binutils') 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); } -- cgit v1.1