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

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