Blame SOURCES/0217-report-newt-free-allocated-variables-don-t-close-dd-.patch

3bb9bc
From 79d5c0352a09fc1bfe8cc491b33a745ac33b7855 Mon Sep 17 00:00:00 2001
3bb9bc
From: Matej Habrnal <mhabrnal@redhat.com>
3bb9bc
Date: Tue, 21 Feb 2017 12:08:13 +0100
3bb9bc
Subject: [PATCH] report-newt: free allocated variables, don't close dd twice
3bb9bc
3bb9bc
Uncovered by coverity.
3bb9bc
3bb9bc
Related #1257159
3bb9bc
3bb9bc
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
3bb9bc
---
3bb9bc
 src/report-newt/report-newt.c | 6 +++++-
3bb9bc
 1 file changed, 5 insertions(+), 1 deletion(-)
3bb9bc
3bb9bc
diff --git a/src/report-newt/report-newt.c b/src/report-newt/report-newt.c
3bb9bc
index 278cfb7..2427d86 100644
3bb9bc
--- a/src/report-newt/report-newt.c
3bb9bc
+++ b/src/report-newt/report-newt.c
3bb9bc
@@ -333,12 +333,16 @@ static int report(const char *dump_dir_name)
3bb9bc
                             not_reportable ? " " : "",
3bb9bc
                             reason ? : _("(no description)"));
3bb9bc
 
3bb9bc
-        dd_close(dd);
3bb9bc
         newtWinMessage(_("Error"), _("Ok"), (char *)"%s", t);
3bb9bc
         free(t);
3bb9bc
+        free(not_reportable);
3bb9bc
+        free(reason);
3bb9bc
 
3bb9bc
         if (get_global_stop_on_not_reportable())
3bb9bc
+        {
3bb9bc
+            dd_close(dd);
3bb9bc
             return -1;
3bb9bc
+        }
3bb9bc
     }
3bb9bc
 
3bb9bc
     dd_close(dd);
3bb9bc
-- 
3bb9bc
1.8.3.1
3bb9bc