PR25362, memory leak in nm

PR 25362
	* nm.c (display_rel_file): Free dyn_syms.
This commit is contained in:
Alan Modra
2020-01-13 19:36:13 +10:30
parent 4f18d7423c
commit 805f38bc55
2 changed files with 7 additions and 0 deletions

View 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