]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: print_gdb_index_section fix memory leak.
authorMark Wielaard <mjw@redhat.com>
Tue, 19 Mar 2013 10:43:49 +0000 (11:43 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 19 Mar 2013 10:45:34 +0000 (11:45 +0100)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/readelf.c

index 07811773e4f28ae36e56be6367e3745bd2b6f583..a641d333e3b7ba957112973b85d35e0adca891e3 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-19  Mark Wielaard  <mjw@redhat.com>
+
+       * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
+
 2013-03-18  Mark Wielaard  <mjw@redhat.com>
 
        * readelf.c (print_gdb_index_section): Accept version 8.
index 9c7880d9f3c4184a8bb646bc94428f6d727aa901..1412bed32dbf9c2a891aa3782df4b4bc6432a0fa 100644 (file)
@@ -7389,6 +7389,8 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       char *h = format_dwarf_addr (dwflmod, 8, high - 1, high);
       printf (" [%4zu] %s..%s, CU index: %5" PRId32 "\n",
              n, l, h, idx);
+      free (l);
+      free (h);
       n++;
     }