diff options
author | Alan Modra <amodra@gmail.com> | 2020-01-13 19:36:13 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-01-13 22:36:07 +1030 |
commit | 805f38bc551de820bcd7b31d3c5731ae27cf853a (patch) | |
tree | 94d60229f985a63f1e483e424d27bd3a23f74d5d /binutils | |
parent | 4f18d7423cdbddc6b8d4a23f4a8c6ae226c576ec (diff) | |
download | gdb-805f38bc551de820bcd7b31d3c5731ae27cf853a.zip gdb-805f38bc551de820bcd7b31d3c5731ae27cf853a.tar.gz gdb-805f38bc551de820bcd7b31d3c5731ae27cf853a.tar.bz2 |
PR25362, memory leak in nm
PR 25362
* nm.c (display_rel_file): Free dyn_syms.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/nm.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b3c499d..4ad4280 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -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 diff --git a/binutils/nm.c b/binutils/nm.c index 99d2027..0ee3f88 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -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 |