diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-05-25 11:17:40 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-05-25 14:54:30 +0300 |
commit | 69555972726e279f1f727fa1fd54ea219b78f113 (patch) | |
tree | 5c34269b7d6f92a4db5c9a9fce172eb6bafc6417 /plugins/wifi.c | |
parent | 6a3f65bff4b8e9a57963c0ac95ee549182986708 (diff) | |
download | connman-69555972726e279f1f727fa1fd54ea219b78f113.tar.gz connman-69555972726e279f1f727fa1fd54ea219b78f113.tar.bz2 connman-69555972726e279f1f727fa1fd54ea219b78f113.zip |
wifi: If scanning, unref the device when removing wifi driver.
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r-- | plugins/wifi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 526bb9ed..ee114133 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -238,6 +238,10 @@ static void wifi_remove(struct connman_device *device) stop_autoscan(device); + /* In case of a user scan, device is still referenced */ + if (connman_device_get_scanning(device) == TRUE) + connman_device_unref(wifi->device); + iface_list = g_list_remove(iface_list, wifi); remove_networks(device, wifi); |