From 2c584a89ee184044dfb5ac5bb554f8ad9038cf1a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 25 Mar 2011 17:18:54 +0000 Subject: [PATCH] * ar.c (write_archive): Plug memory leak. --- binutils/ChangeLog | 1 + binutils/ar.c | 1 + 2 files changed, 2 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ae56956a5..99e5ed71f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -3,6 +3,7 @@ * strings.c (print_strings): Plug memory leak. * ar.c (move_members): Plug memory leak. (delete_members): Plug memory leak. + (write_archive): Plug memory leak. 2011-03-25 Pierre Muller diff --git a/binutils/ar.c b/binutils/ar.c index 263795fb7..206c7a978 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1069,6 +1069,7 @@ write_archive (bfd *iarch) if (smart_rename (new_name, old_name, 0) != 0) xexit (1); + free (old_name); } /* Return a pointer to the pointer to the entry which should be rplacd'd -- 2.11.4.GIT