summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2017-09-22 09:58:46 +0530
committertaesub kim <taesub.kim@samsung.com>2017-09-22 15:43:17 +0900
commitf4d62a3d026e5a2ad84decf7ab99b80f76ff5892 (patch)
treeac6098d43967d36d4cc37b85f27a9cb8c0605ced /plugins/wifi.c
parent05a82de3f7caf230706acc6251a2a739833d4ab3 (diff)
downloadconnman-f4d62a3d026e5a2ad84decf7ab99b80f76ff5892.tar.gz
connman-f4d62a3d026e5a2ad84decf7ab99b80f76ff5892.tar.bz2
connman-f4d62a3d026e5a2ad84decf7ab99b80f76ff5892.zip
Device reference count is referenced when scanning is set to true, so it should be dereferenced only when scanning is set to false, In one particular case scanning was not being set to false while device was unreferenced when wifi->allow_full_scan is true. Change-Id: Ib8fc675d224eddc8e1dfa4a4a271f7c5b64209fe Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'plugins/wifi.c')
-rwxr-xr-xplugins/wifi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index ce532336..5a85785d 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1323,7 +1323,11 @@ static void scan_callback(int result, GSupplicantInterface *interface,
* unreferenced the device, obviating the need to do it here.
*/
+#if defined TIZEN_EXT
+ if (scanning && wifi && !wifi->allow_full_scan)
+#else
if (scanning)
+#endif
connman_device_unref(device);
#if defined TIZEN_EXT