2011-03-07 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 14 Mar 2011 17:48:31 +0000 (17:48 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 14 Mar 2011 17:48:31 +0000 (17:48 +0000)
* readelf.c (process_version_sections): Free symbols.

binutils/ChangeLog
binutils/readelf.c

index 3f33f80..2ec667f 100644 (file)
@@ -1,5 +1,7 @@
 2011-03-14  Michael Snyder  <msnyder@vmware.com>
 
+       * readelf.c (process_version_sections): Free symbols.
+
        * nm.c (display_rel_file): Free symsizes.
 
 2011-03-10  Nick Clifton  <nickc@redhat.com>
index 71f0501..6a4a6e8 100644 (file)
@@ -8053,7 +8053,10 @@ process_version_sections (FILE * file)
                                         string_sec->sh_size,
                                         _("version string table"));
            if (!strtab)
-             break;
+             {
+               free (symbols);
+               break;
+             }
 
            printf (_("\nVersion symbols section '%s' contains %d entries:\n"),
                    SECTION_NAME (section), total);
@@ -8073,6 +8076,7 @@ process_version_sections (FILE * file)
            if (!edata)
              {
                free (strtab);
+               free (symbols);
                break;
              }