* ar.c (write_archive): Plug memory leak.
authorNick Clifton <nickc@redhat.com>
Fri, 25 Mar 2011 17:18:54 +0000 (17:18 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 25 Mar 2011 17:18:54 +0000 (17:18 +0000)
binutils/ChangeLog
binutils/ar.c

index ae56956a5dce2c4535ec7cb7692803722cb92036..99e5ed71fdd47dfac50376075cbc228928a5c5fd 100644 (file)
@@ -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  <muller@ics.u-strasbg.fr>
 
index 263795fb7ee5e866ae2799f7720427ee2ea972b3..206c7a9781d7cb66a66575710fda6c23207a484b 100644 (file)
@@ -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