aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-06-19 23:20:58 -0400
committerMike Frysinger <vapier@gentoo.org>2016-06-19 23:20:58 -0400
commit107cf9e4c69a1e5add5be2e31e3134493f0cac8a (patch)
treefa03f9052568bd96bfb58a51558e304f566c3d80
parentscanelf: avoid leaking root_fd when multiple --root args are passed (diff)
downloadpax-utils-107cf9e4c69a1e5add5be2e31e3134493f0cac8a.tar.gz
pax-utils-107cf9e4c69a1e5add5be2e31e3134493f0cac8a.tar.bz2
pax-utils-107cf9e4c69a1e5add5be2e31e3134493f0cac8a.zip
scanelf: avoid leaking out_format when multiple --format args are passed
-rw-r--r--scanelf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scanelf.c b/scanelf.c
index 3f33d89..7190301 100644
--- a/scanelf.c
+++ b/scanelf.c
@@ -2272,7 +2272,8 @@ static int parseargs(int argc, char *argv[])
xarraypush_str(find_lib_arr, optarg);
break;
case 'F': {
- if (out_format) warn("You prob don't want to specify -F twice");
+ if (out_format)
+ free(out_format);
if (PAX_UTILS_CLEANUP)
out_format = xstrdup(optarg);
else