* readelf.c (process_gnu_liblist): Stop memory leak.
authorNick Clifton <nickc@redhat.com>
Wed, 30 Mar 2011 15:37:48 +0000 (15:37 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 30 Mar 2011 15:37:48 +0000 (15:37 +0000)
binutils/ChangeLog
binutils/readelf.c

index e6a682ee8b287e18f1bf6ce149254e37c95cdf77..f9d845775075ed793e7dfbfd50c37554d8637006 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-30  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
+
+       * readelf.c (process_gnu_liblist): Stop memory leak.
+
 2011-03-29  Alan Modra  <amodra@gmail.com>
 
        * coffdump.c: Include bfd_stdint.h
index 6a4a6e8d231dc40222be5d04079655be643ebab0..9b4f237f9f4ad99936dcf885d0beeb9edc3e57b7 100644 (file)
@@ -11846,6 +11846,7 @@ process_gnu_liblist (FILE * file)
              || section->sh_entsize != sizeof (Elf32_External_Lib))
            {
              free (elib);
+             free (strtab);
              break;
            }
 
@@ -11887,6 +11888,7 @@ process_gnu_liblist (FILE * file)
            }
 
          free (elib);
+         free (strtab);
        }
     }