summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-06-21 13:57:33 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-06-25 09:48:14 +0300
commit513387fe71c00202f2e73703cbb7beef0150d9a7 (patch)
tree37f1f1917a32618050c1f00188879e7a41e48f24 /plugins/wifi.c
parent3d72128f5b988ca0f214163fda8ecbf26ffb498c (diff)
downloadconnman-513387fe71c00202f2e73703cbb7beef0150d9a7.tar.gz
connman-513387fe71c00202f2e73703cbb7beef0150d9a7.tar.bz2
connman-513387fe71c00202f2e73703cbb7beef0150d9a7.zip
wifi: Check we have valid wifi pointer in autoscan
The wifi pointer in device might be NULL if wpa_supplicant dies between autoscans.
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r--plugins/wifi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 3e489995..f1ee6da0 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -502,6 +502,9 @@ static gboolean autoscan_timeout(gpointer data)
struct autoscan_params *autoscan;
int interval;
+ if (wifi == NULL)
+ return FALSE;
+
autoscan = wifi->autoscan;
if (autoscan->interval <= 0) {