fix: nm-device-wifi disconnect signal from supplicatant.iface==NULL

This fixes a glib assertion.

Backtrace:
 #0  0x00007f139ab08e0d in g_logv () from /lib64/libglib-2.0.so.0
 #1  0x00007f139ab08ff2 in g_log () from /lib64/libglib-2.0.so.0
 #2  0x0000003f9aa3151a in g_type_check_instance () from /lib64/libgobject-2.0.so.0
 #3  0x0000003f9aa272d4 in g_signal_handlers_disconnect_matched () from /lib64/libgobject-2.0.so.0
 #4  0x0000000000495b7d in supplicant_interface_release (self=0xc58040) at devices/nm-device-wifi.c:423
 #5  0x0000000000498a28 in dispose (object=0xc58040) at devices/nm-device-wifi.c:3525
 #6  0x0000003f9aa14338 in g_object_unref () from /lib64/libgobject-2.0.so.0
 #7  0x000000000047699a in remove_device (manager=manager@entry=0xc09050, device=0xc58040, quitting=quitting@entry=1) at nm-manager.c:748
 #8  0x0000000000478a84 in dispose (object=0xc09050) at nm-manager.c:4558
 #9  0x0000003f9aa14338 in g_object_unref () from /lib64/libgobject-2.0.so.0
 #10 0x0000000000428cc0 in main (argc=1, argv=0x7fffc0948c98) at main.c:626

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2013-08-30 19:21:50 +02:00
parent 0c15e1c2ce
commit f218f9195b

View File

@@ -419,16 +419,16 @@ supplicant_interface_release (NMDeviceWifi *self)
remove_supplicant_interface_error_handler (self); remove_supplicant_interface_error_handler (self);
/* Clear supplicant interface signal handlers */
g_signal_handlers_disconnect_matched (priv->supplicant.iface, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, self);
if (priv->scanlist_cull_id) { if (priv->scanlist_cull_id) {
g_source_remove (priv->scanlist_cull_id); g_source_remove (priv->scanlist_cull_id);
priv->scanlist_cull_id = 0; priv->scanlist_cull_id = 0;
} }
if (priv->supplicant.iface) { if (priv->supplicant.iface) {
/* Clear supplicant interface signal handlers */
g_signal_handlers_disconnect_matched (priv->supplicant.iface, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, self);
/* Tell the supplicant to disconnect from the current AP */ /* Tell the supplicant to disconnect from the current AP */
nm_supplicant_interface_disconnect (priv->supplicant.iface); nm_supplicant_interface_disconnect (priv->supplicant.iface);