diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-11-14 19:54:38 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-11-14 20:22:23 +0100 |
commit | 446858cf8dd11c777b0d312a5f680d2905d3d09c (patch) | |
tree | 196c05f7cc71484db9e7e4be09074f57c4c60bdd /libnm | |
parent | dfa90861e87ec14676cb9523f01fe2a71a8eae43 (diff) |
libnm/client: unref all the objects on dispose
We created them, we own them.
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libnm/nm-client.c b/libnm/nm-client.c index 14f0d38a2..543f0b872 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -2416,6 +2416,14 @@ dispose (GObject *object) } if (priv->object_manager) { + GList *objects, *iter; + + /* Unhook the NM objects. */ + objects = g_dbus_object_manager_get_objects (priv->object_manager); + for (iter = objects; iter; iter = iter->next) + g_object_set_qdata (G_OBJECT (iter->data), _nm_object_obj_nm_quark (), NULL); + g_list_free_full (objects, g_object_unref); + g_signal_handlers_disconnect_by_data (priv->object_manager, object); g_clear_object (&priv->object_manager); } |