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

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