commit:     107cf9e4c69a1e5add5be2e31e3134493f0cac8a
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 20 03:20:58 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 03:20:58 2016 +0000
URL:        https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=107cf9e4

scanelf: avoid leaking out_format when multiple --format args are passed

 scanelf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

Reply via email to