[tracker/direct-access] tracker-store: Plug some leaks in dbus shutdown
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access] tracker-store: Plug some leaks in dbus shutdown
- Date: Thu, 22 Jul 2010 15:07:02 +0000 (UTC)
commit 383964653d3327602d55d9a36c2a998be7950a82
Author: Martyn Russell <martyn lanedo com>
Date: Thu Jul 22 16:06:25 2010 +0100
tracker-store: Plug some leaks in dbus shutdown
src/tracker-store/tracker-dbus.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/src/tracker-store/tracker-dbus.c b/src/tracker-store/tracker-dbus.c
index 3d42d4c..864639a 100644
--- a/src/tracker-store/tracker-dbus.c
+++ b/src/tracker-store/tracker-dbus.c
@@ -168,10 +168,12 @@ tracker_dbus_shutdown (void)
tracker_dbus_set_available (FALSE);
if (backup) {
+ dbus_g_connection_unregister_g_object (connection, G_OBJECT (backup));
g_object_unref (backup);
}
if (notifier) {
+ dbus_g_connection_unregister_g_object (connection, G_OBJECT (notifier));
g_object_unref (notifier);
}
@@ -204,22 +206,28 @@ tracker_dbus_set_available (gboolean available)
tracker_dbus_register_objects ();
}
} else {
- if (objects) {
- dbus_g_proxy_disconnect_signal (gproxy,
- "NameOwnerChanged",
- G_CALLBACK (name_owner_changed_cb),
- tracker_dbus_get_object (TRACKER_TYPE_RESOURCES));
+ GSList *l;
+
+ if (objects) {
+ dbus_g_proxy_disconnect_signal (gproxy,
+ "NameOwnerChanged",
+ G_CALLBACK (name_owner_changed_cb),
+ tracker_dbus_get_object (TRACKER_TYPE_RESOURCES));
#ifdef HAVE_DBUS_FD_PASSING
dbus_connection_remove_filter (dbus_g_connection_get_connection (connection),
tracker_steroids_connection_filter,
tracker_dbus_get_object (TRACKER_TYPE_STEROIDS));
#endif
+ }
- g_slist_foreach (objects, (GFunc) g_object_unref, NULL);
- g_slist_free (objects);
- objects = NULL;
- }
+ for (l = objects; l; l = l->next) {
+ dbus_g_connection_unregister_g_object (connection, l->data);
+ g_object_unref (l->data);
+ }
+
+ g_slist_free (objects);
+ objects = NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]