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 3f33f80bb653676634edb8fb9ea491dd7d854662..2ec667f0897d75894ccb408fe93ba02650e7adac 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 71f0501760779f37b722814362960dff07522c51..6a4a6e8d231dc40222be5d04079655be643ebab0 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;
              }