Background scanning is never correctly initialized as scan_params has
never been initialized, and the current behaviour is to allocate the
wifi scan_params if it is null.

This commit fixes background scanning by ensuring we set the pointer
to NULL.

Signed-off-by: Michael Ikey Doherty <[email protected]>
---
 plugins/wifi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index bac1fc6..f676218 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -181,6 +181,7 @@ static int wifi_probe(struct connman_device *device)
        wifi->tethering = false;
        wifi->bridged = false;
        wifi->bridge = NULL;
+       wifi->scan_params = NULL;
        wifi->state = G_SUPPLICANT_STATE_INACTIVE;
 
        connman_device_set_data(device, wifi);
-- 
1.8.3.1

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to