Blame SOURCES/0009-fix-a-double-free-error-in-abrt-applet.patch

baab13
From 3942edc6d48cf9946a190d6e81b5b122b90a1b72 Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Wed, 15 Jan 2014 12:58:03 +0100
baab13
Subject: [ABRT PATCH 09/12] fix a double free error in abrt-applet
baab13
baab13
Closes rhbz#1053534
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/applet/applet.c | 8 +++++---
baab13
 1 file changed, 5 insertions(+), 3 deletions(-)
baab13
baab13
diff --git a/src/applet/applet.c b/src/applet/applet.c
baab13
index 17e1cfb..9971e04 100644
baab13
--- a/src/applet/applet.c
baab13
+++ b/src/applet/applet.c
baab13
@@ -890,7 +890,6 @@ static void notify_problem_list(GList *problems, int flags)
baab13
                 NOTIFY_ACTION_CALLBACK(action_ignore),
baab13
                 pi, NULL);
baab13
 
baab13
-        free(notify_body);
baab13
         notify_body = build_message(pi);
baab13
 
baab13
         pi->was_announced = true;
baab13
@@ -950,7 +949,7 @@ static void notify_problem_list(GList *problems, int flags)
baab13
                     {
baab13
                         problem_info_free(pi);
baab13
                         g_object_unref(notification);
baab13
-                        continue;
baab13
+                        goto next_problem_to_notify;
baab13
                     }
baab13
 
baab13
                     notify_notification_update(notification, _("A Problem has been Reported"), notify_body, NULL);
baab13
@@ -965,7 +964,6 @@ static void notify_problem_list(GList *problems, int flags)
baab13
                 }
baab13
             }
baab13
         }
baab13
-        free(notify_body);
baab13
 
baab13
         GError *err = NULL;
baab13
         log_debug("Showing a notification");
baab13
@@ -975,6 +973,10 @@ static void notify_problem_list(GList *problems, int flags)
baab13
             error_msg(_("Can't show notification: %s"), err->message);
baab13
             g_error_free(err);
baab13
         }
baab13
+
baab13
+next_problem_to_notify:
baab13
+        free(notify_body);
baab13
+        notify_body = NULL;
baab13
     }
baab13
 
baab13
     g_list_free(problems);
baab13
-- 
baab13
1.8.3.1
baab13