mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 10:18:03 +02:00
libnm: Fix a nm_running_changed race
Unhook the nm_running_changed signal, so that it does not attempt to free connections after they've been disposed already. https://bugzilla.gnome.org/show_bug.cgi?id=739127
This commit is contained in:
parent
1f275a980a
commit
4f9e2e9603
1 changed files with 3 additions and 1 deletions
|
|
@ -681,7 +681,7 @@ init_dbus (NMObject *object)
|
|||
property_info);
|
||||
|
||||
g_signal_connect (object, "notify::" NM_OBJECT_NM_RUNNING,
|
||||
G_CALLBACK (nm_running_changed), NULL);
|
||||
G_CALLBACK (nm_running_changed), object);
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
|
@ -727,6 +727,8 @@ dispose (GObject *object)
|
|||
g_clear_pointer (&priv->all_connections, g_ptr_array_unref);
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (object, G_CALLBACK (nm_running_changed), self);
|
||||
|
||||
g_clear_pointer (&priv->visible_connections, g_ptr_array_unref);
|
||||
g_clear_pointer (&priv->hostname, g_free);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue