[gnome-settings-daemon/gnome-3-8] updates: Prevent crashes due to use after free
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-8] updates: Prevent crashes due to use after free
- Date: Thu, 5 Sep 2013 11:34:51 +0000 (UTC)
commit 014730823b368dd30314751d96e5a5197e98535c
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Sep 4 16:59:55 2013 +0200
updates: Prevent crashes due to use after free
Should fix both of these issues:
https://retrace.fedoraproject.org/faf/problems/206547/
https://retrace.fedoraproject.org/faf/problems/242602/
https://bugzilla.gnome.org/show_bug.cgi?id=707480
plugins/updates/gsd-updates-manager.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index bb242ab..ffe10f7 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -490,6 +490,8 @@ notify_critical_updates (GsdUpdatesManager *manager, GPtrArray *array)
}
/* track so we can prevent doubled notifications */
manager->priv->notification_updates = notification;
+ g_object_add_weak_pointer (G_OBJECT (manager->priv->notification_updates),
+ (void **) &manager->priv->notification_updates);
}
static void
@@ -558,6 +560,8 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
/* track so we can prevent doubled notifications */
manager->priv->notification_updates = notification;
+ g_object_add_weak_pointer (G_OBJECT (manager->priv->notification_updates),
+ (void **) &manager->priv->notification_updates);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]