This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR25362, memory leak in nm
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 13 Jan 2020 22:38:57 +1030
- Subject: PR25362, memory leak in nm
PR 25362
* nm.c (display_rel_file): Free dyn_syms.
diff --git a/binutils/nm.c b/binutils/nm.c
index 99d2027250..0ee3f88386 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
--
Alan Modra
Australia Development Lab, IBM