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

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