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

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