PR25362, memory leak in nm
authorAlan Modra <amodra@gmail.com>
Mon, 13 Jan 2020 09:06:13 +0000 (19:36 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 13 Jan 2020 12:06:07 +0000 (22:36 +1030)
PR 25362
* nm.c (display_rel_file): Free dyn_syms.

binutils/ChangeLog
binutils/nm.c

index b3c499d466e9502ea4b6a2018528701188c373e0..4ad4280d7cea1d2ca0135b4bf178bf5fd6683eea 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-13  Alan Modra  <amodra@gmail.com>
+
+       PR 25362
+       * nm.c (display_rel_file): Free dyn_syms.
+
 2020-01-09  Nick Clifton  <nickc@redhat.com>
 
        PR 25220
index 99d2027250fc6cfa3e7fbbd4c96c0a34e2e7cf76..0ee3f8838654adb39054f1ad64cc4eab2b4cc288 100644 (file)
@@ -1171,6 +1171,8 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
          *symp = 0;
          symcount += synth_count;
        }
+      if (!dynamic && dyn_syms != NULL)
+       free (dyn_syms);
     }
 
   /* lto_slim_object is set to false when a bfd is loaded with a compiler
This page took 0.03082 seconds and 4 git commands to generate.