[binutils-gdb] Free gas/dwarf2dbg.c dirs
Alan Modra
amodra@sourceware.org
Thu Jan 26 21:54:01 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d437724a56dfa2150a03976497f429164e19e802
commit d437724a56dfa2150a03976497f429164e19e802
Author: Alan Modra <amodra@gmail.com>
Date: Thu Jan 26 19:12:09 2023 +1030
Free gas/dwarf2dbg.c dirs
Entries are allocated with xmemdup0.
* dwarf2dbg.c (dwarf2_cleanup): Free dirs entries.
Diff:
---
gas/dwarf2dbg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 5f2f58ff7b0..c7d9e8ef72f 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -3096,6 +3096,8 @@ dwarf2_cleanup (void)
{
purge_generated_debug (true);
free (files);
+ for (unsigned int i = 0; i < dirs_in_use; i++)
+ free (dirs[i]);
free (dirs);
}
More information about the Binutils-cvs
mailing list