diff options
author | Saurav Babu <saurav.babu@samsung.com> | 2017-09-22 09:58:46 +0530 |
---|---|---|
committer | Saurav Babu <saurav.babu@samsung.com> | 2017-09-22 10:04:41 +0530 |
commit | 1141e83b5a00d11bada4e07e8203770b3d36939b (patch) | |
tree | ac6098d43967d36d4cc37b85f27a9cb8c0605ced | |
parent | 59eb8331decf9e096c9e94d61a99152d462413a6 (diff) | |
download | connman-1141e83b5a00d11bada4e07e8203770b3d36939b.tar.gz connman-1141e83b5a00d11bada4e07e8203770b3d36939b.tar.bz2 connman-1141e83b5a00d11bada4e07e8203770b3d36939b.zip |
wifi: Fixed issue with device reference countsubmit/tizen/20170926.020531submit/tizen/20170922.065607accepted/tizen/unified/20170927.063111
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-x | plugins/wifi.c | 4 |
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 |