This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] ar.c (write_archive): Plug memory leak.


OK?

2011-03-08  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* ar.c (write_archive): Plug memory leak.

Index: ar.c
===================================================================
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.72
diff -u -p -r1.72 ar.c
--- ar.c	8 Dec 2010 05:05:30 -0000	1.72
+++ ar.c	8 Mar 2011 20:43:54 -0000
@@ -1068,6 +1072,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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]