From: Alan Modra Date: Sat, 29 Oct 2022 00:12:50 +0000 (+1030) Subject: Fix small objcopy memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5d4b1b6046a77b04ad180d0974221371779599a;p=binutils-gdb.git Fix small objcopy memory leak * objcopy.c (copy_archive): Free l->name. --- diff --git a/binutils/objcopy.c b/binutils/objcopy.c index d20aaef9f4f..03350babb69 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); }