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>
* 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