[gnome-maps/gnome-3-24] contactStore: Avoid use-after free
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-24] contactStore: Avoid use-after free
- Date: Mon, 8 May 2017 21:05:04 +0000 (UTC)
commit 2f594013405a7ed71caad8cef3337655bc349fb1
Author: Marcus Lundblad <ml update uu se>
Date: Mon May 8 21:35:36 2017 +0200
contactStore: Avoid use-after free
Clear pointers in dispose vfunc to avoid crashes when ::dispose() is called
multiple times on the contact store object.
https://bugzilla.gnome.org/show_bug.cgi?id=782254
lib/maps-contact-store.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/maps-contact-store.c b/lib/maps-contact-store.c
index fe9982a..3c355d6 100644
--- a/lib/maps-contact-store.c
+++ b/lib/maps-contact-store.c
@@ -66,8 +66,8 @@ maps_contact_store_dispose (GObject *object)
{
MapsContactStore *store = (MapsContactStore *) object;
- g_list_free (store->priv->list);
- g_object_unref (store->priv->aggregator);
+ g_clear_pointer (&store->priv->list, g_list_free);
+ g_clear_object (&store->priv->aggregator);
G_OBJECT_CLASS (maps_contact_store_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]