Blob Blame History Raw
From 65c24bb248b9b7b2e33e8b0ba9e3e06ffde4b291 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Mon, 18 May 2015 15:46:59 +0200
Subject: [PATCH] applet: fix problem info double free

There was a double free when an action function was called.
Problem info is freed when the notification is destroyed because the free
function is registred when the action is added
(notify_notification_add_action()). So the problem_info_unref() function in the
action function is moreover and causes the double free problem.

Related to rhbz#1211644

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
 src/applet/applet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/applet/applet.c b/src/applet/applet.c
index 4df69fc..c00f7e3 100644
--- a/src/applet/applet.c
+++ b/src/applet/applet.c
@@ -501,7 +501,6 @@ static void action_report(NotifyNotification *notification, gchar *action, gpoin
     problem_info_t *pi = (problem_info_t *)user_data;
     if (problem_info_get_dir(pi))
         fork_exec_gui(problem_info_get_dir(pi));
-    problem_info_unref(pi);
 }
 
 static void action_restart(NotifyNotification *notification, gchar *action, gpointer user_data)
@@ -528,7 +527,6 @@ static void action_restart(NotifyNotification *notification, gchar *action, gpoi
                    err->message);
     }
     g_object_unref (app);
-    problem_info_unref(pi);
 }
 
 static void on_notify_close(NotifyNotification *notification, gpointer user_data)
-- 
2.4.1