summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2017-09-22 04:28:46 (GMT)
committertaesub kim <taesub.kim@samsung.com>2017-09-22 06:43:17 (GMT)
commitf4d62a3d026e5a2ad84decf7ab99b80f76ff5892 (patch)
treeac6098d43967d36d4cc37b85f27a9cb8c0605ced
parent05a82de3f7caf230706acc6251a2a739833d4ab3 (diff)
downloadconnman-submit/tizen_4.0/20170922.070056.zip
connman-submit/tizen_4.0/20170922.070056.tar.gz
connman-submit/tizen_4.0/20170922.070056.tar.bz2
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>
-rwxr-xr-xplugins/wifi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index ce53233..5a85785 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