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

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