diff options
author | Dan Winship <danw@gnome.org> | 2014-02-26 13:18:23 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-26 13:36:28 -0500 |
commit | a7d6cac1baee73db405c61565b74c4b35c0bc86f (patch) | |
tree | 5f4a657a51b072af9a9a360f5986d7b523176f08 | |
parent | 4edae526c1bd54deed182fa31ce9e7f0636300f2 (diff) | |
download | NetworkManager-a7d6cac1baee73db405c61565b74c4b35c0bc86f.tar.gz |
core: make nm_manager_get() not ref the manager
For consistency with other singleton getters (and to fix the numerous
places that are currently calling nm_manager_get() without unreffing
it afterward), make nm_manager_get() not ref the manager when
returning it.
-rw-r--r-- | src/devices/nm-device-olpc-mesh.c | 4 | ||||
-rw-r--r-- | src/nm-manager.c | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/devices/nm-device-olpc-mesh.c b/src/devices/nm-device-olpc-mesh.c index c419daa5e7..6ac03bae6d 100644 --- a/src/devices/nm-device-olpc-mesh.c +++ b/src/devices/nm-device-olpc-mesh.c @@ -380,7 +380,6 @@ dispose (GObject *object) g_signal_handler_disconnect (manager, priv->device_added_id); if (priv->device_removed_id) g_signal_handler_disconnect (manager, priv->device_removed_id); - g_object_unref (manager); G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object); } @@ -555,7 +554,6 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) g_signal_handler_disconnect (manager, priv->device_added_id); priv->device_added_id = 0; } - g_object_unref (manager); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, @@ -632,8 +630,6 @@ check_companion_cb (gpointer user_data) break; } - g_object_unref (manager); - done: nm_device_remove_pending_action (NM_DEVICE (self), "waiting for companion"); return FALSE; diff --git a/src/nm-manager.c b/src/nm-manager.c index da99a02d77..6126c86281 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -4690,7 +4690,7 @@ NMManager * nm_manager_get (void) { g_assert (singleton); - return g_object_ref (singleton); + return singleton; } NMManager * |