Matej Habrnal 34dad7
From 65c24bb248b9b7b2e33e8b0ba9e3e06ffde4b291 Mon Sep 17 00:00:00 2001
Matej Habrnal 34dad7
From: Matej Habrnal <mhabrnal@redhat.com>
Matej Habrnal 34dad7
Date: Mon, 18 May 2015 15:46:59 +0200
Matej Habrnal 34dad7
Subject: [PATCH] applet: fix problem info double free
Matej Habrnal 34dad7
Matej Habrnal 34dad7
There was a double free when an action function was called.
Matej Habrnal 34dad7
Problem info is freed when the notification is destroyed because the free
Matej Habrnal 34dad7
function is registred when the action is added
Matej Habrnal 34dad7
(notify_notification_add_action()). So the problem_info_unref() function in the
Matej Habrnal 34dad7
action function is moreover and causes the double free problem.
Matej Habrnal 34dad7
Matej Habrnal 34dad7
Related to rhbz#1211644
Matej Habrnal 34dad7
Matej Habrnal 34dad7
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
Matej Habrnal 34dad7
---
Matej Habrnal 34dad7
 src/applet/applet.c | 2 --
Matej Habrnal 34dad7
 1 file changed, 2 deletions(-)
Matej Habrnal 34dad7
Matej Habrnal 34dad7
diff --git a/src/applet/applet.c b/src/applet/applet.c
Matej Habrnal 34dad7
index 4df69fc..c00f7e3 100644
Matej Habrnal 34dad7
--- a/src/applet/applet.c
Matej Habrnal 34dad7
+++ b/src/applet/applet.c
Matej Habrnal 34dad7
@@ -501,7 +501,6 @@ static void action_report(NotifyNotification *notification, gchar *action, gpoin
Matej Habrnal 34dad7
     problem_info_t *pi = (problem_info_t *)user_data;
Matej Habrnal 34dad7
     if (problem_info_get_dir(pi))
Matej Habrnal 34dad7
         fork_exec_gui(problem_info_get_dir(pi));
Matej Habrnal 34dad7
-    problem_info_unref(pi);
Matej Habrnal 34dad7
 }
Matej Habrnal 34dad7
 
Matej Habrnal 34dad7
 static void action_restart(NotifyNotification *notification, gchar *action, gpointer user_data)
Matej Habrnal 34dad7
@@ -528,7 +527,6 @@ static void action_restart(NotifyNotification *notification, gchar *action, gpoi
Matej Habrnal 34dad7
                    err->message);
Matej Habrnal 34dad7
     }
Matej Habrnal 34dad7
     g_object_unref (app);
Matej Habrnal 34dad7
-    problem_info_unref(pi);
Matej Habrnal 34dad7
 }
Matej Habrnal 34dad7
 
Matej Habrnal 34dad7
 static void on_notify_close(NotifyNotification *notification, gpointer user_data)
Matej Habrnal 34dad7
-- 
Matej Habrnal 34dad7
2.4.1
Matej Habrnal 34dad7