diff options
author | Mark Wielaard <[email protected]> | 2013-12-14 15:02:56 +0100 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2013-12-16 09:03:22 +0100 |
commit | e6e6cc83ea27413facb310ce48bebb1579a47130 (patch) | |
tree | 2adebd93be5b6af838c70c718047ad3eb5383372 /libdwfl/dwfl_module.c | |
parent | 5cbf42aaf47195e2c41171786371d55b253a7667 (diff) |
libdwfl: Fix various frame related memory leaks.
The result of dwarf_cfi_addrframe should have been freed when done.
Dwfl_Module cached the reloc_info and the eh_cfi it which also should
have been released when disposing of the module.
Reported-by: Masatake YAMATO <[email protected]>
Tested-by: Masatake YAMATO <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdwfl/dwfl_module.c')
-rw-r--r-- | libdwfl/dwfl_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index f914b3a3..bb167ab2 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -84,6 +84,12 @@ __libdwfl_module_free (Dwfl_Module *mod) if (mod->build_id_bits != NULL) free (mod->build_id_bits); + if (mod->reloc_info != NULL) + free (mod->reloc_info); + + if (mod->eh_cfi != NULL) + dwarf_cfi_end (mod->eh_cfi); + free (mod->name); free (mod); } |