If free_network is called before the driver->disable() callback
the device has been removed from the networking structure.
clear_scan_trigger(device);
clear_scan_trigger(device);
- g_hash_table_remove_all(device->networks);
-
err = device->driver->disable(device);
if (err < 0 && err != -EALREADY) {
if (err == -EINPROGRESS)
err = device->driver->disable(device);
if (err < 0 && err != -EALREADY) {
if (err == -EINPROGRESS)
+ g_hash_table_remove_all(device->networks);
+
device->connections = 0;
device->powered_pending = FALSE;
device->connections = 0;
device->powered_pending = FALSE;