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