libnm-glib: fix the leak that breaks the shell network status icon

All NMObjects created in response to property changes were getting
leaked, which in particular included all NMAccessPoint objects, which
meant that after disconnecting and reconnecting a wifi interface some
number of times (depending on how many access points were in the
area), gnome-shell would be watching so many D-Bus AccessPoint objects
(most of which didn't exist any more) that it would hit dbus-daemon's
limit on the number of match rules you can register, which meant that
NMActiveConnections created after that point wouldn't be able to
register for PropertiesChanged notifications, which meant that the
network status icon would get out of sync.
This commit is contained in:
Dan Winship 2013-10-03 09:52:24 -04:00
parent 8695410d86
commit 28e67c7d73

View file

@ -264,16 +264,14 @@ init_async_got_manager_running (DBusGProxy *proxy, DBusGProxyCall *call,
G_TYPE_BOOLEAN, &priv->nm_running,
G_TYPE_INVALID)) {
init_async_complete (simple, error);
return;
}
if (!priv->nm_running) {
} else if (!priv->nm_running) {
priv->inited = TRUE;
init_async_complete (simple, NULL);
return;
}
} else
_nm_object_reload_properties_async (self, init_async_got_properties, simple);
_nm_object_reload_properties_async (self, init_async_got_properties, simple);
/* g_async_result_get_source_object() adds a ref */
g_object_unref (self);
}
static void