summaryrefslogtreecommitdiff
path: root/src/unstrip.c
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-04-03 19:36:12 +0200
committerMark Wielaard <mark@klomp.org>2021-04-13 14:45:34 +0200
commit1261691accb3f224ebbaef438a641273c4c3c49f (patch)
tree35ed6190e87b4de670be674d1ee6c8f63faab345 /src/unstrip.c
parentb58516a620c70db026b13f6c36b634d3ae7f1739 (diff)
downloadelfutils-1261691accb3f224ebbaef438a641273c4c3c49f.tar.gz
unstrip: Fix small leak in handle_output_dir_module.
eu-unstrip might leak a string for each module found when using the -d option. Make sure to free the output_file name when we are done with the module. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'src/unstrip.c')
-rw-r--r--src/unstrip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unstrip.c b/src/unstrip.c
index f7742ebd..e488e810 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -2404,6 +2404,8 @@ handle_output_dir_module (const char *output_dir, Dwfl_Module *mod, bool force,
error (EXIT_FAILURE, 0, _("memory exhausted"));
handle_dwfl_module (output_file, true, force, mod, all, ignore, relocate);
+
+ free (output_file);
}