* readelf.c (process_object): Free dynamic_section after use.
authorMaciej W. Rozycki <macro@linux-mips.org>
Wed, 19 Jan 2011 18:19:54 +0000 (18:19 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Wed, 19 Jan 2011 18:19:54 +0000 (18:19 +0000)
binutils/ChangeLog
binutils/readelf.c

index 4e62cdcb9321573d4ce0154a6f85ce5f56f3fd0d..d02f4583fc1d8a3a08d32f4e9674f2ee9b8bf2b8 100644 (file)
@@ -1,3 +1,7 @@
+2011-01-19  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * readelf.c (process_object): Free dynamic_section after use.
+
 2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/12408
index abc251a50010fb2dc2b7b90b0b4067790caa9157..af1a00208f2e7f47c83cdffb6e7cee646506705e 100644 (file)
@@ -12405,6 +12405,12 @@ process_object (char * file_name, FILE * file)
       dynamic_syminfo = NULL;
     }
 
+  if (dynamic_section)
+    {
+      free (dynamic_section);
+      dynamic_section = NULL;
+    }
+
   if (section_headers_groups)
     {
       free (section_headers_groups);