[glib/wip/gcleanup] gdbusname: Cleanup global tables
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] gdbusname: Cleanup global tables
- Date: Sat, 9 Nov 2013 19:56:21 +0000 (UTC)
commit 8541e8f6a87b2ab73e319d2de68f5fdb4389f5a9
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:15:56 2013 +0100
gdbusname: Cleanup global tables
gio/gdbusnameowning.c | 1 +
gio/gdbusnamewatching.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index 791d2f5..22f81d0 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -650,6 +650,7 @@ g_bus_own_name (GBusType bus_type,
if (map_id_to_client == NULL)
{
map_id_to_client = g_hash_table_new (g_direct_hash, g_direct_equal);
+ G_CLEANUP_LATE (map_id_to_client, g_hash_table_unref);
}
g_hash_table_insert (map_id_to_client,
GUINT_TO_POINTER (client->id),
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 12e8ed7..a280bce 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -574,6 +574,7 @@ g_bus_watch_name (GBusType bus_type,
if (map_id_to_client == NULL)
{
map_id_to_client = g_hash_table_new (g_direct_hash, g_direct_equal);
+ G_CLEANUP_LATE (map_id_to_client, g_hash_table_unref);
}
g_hash_table_insert (map_id_to_client,
GUINT_TO_POINTER (client->id),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]