aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-12-28 10:11:23 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-28 10:11:23 (GMT)
commite5fc8c8ce52984aa259d87b16dc65312a889d707 (patch)
treec867711134bd9b258f53cc92d823cb3232410a11 /wpa_supplicant/bss.c
parent34359a3fb13f52f8aec00c48f1a2c36d803abec3 (diff)
downloadhostap-e5fc8c8ce52984aa259d87b16dc65312a889d707.zip
hostap-e5fc8c8ce52984aa259d87b16dc65312a889d707.tar.gz
hostap-e5fc8c8ce52984aa259d87b16dc65312a889d707.tar.bz2
Fix crash on BSS deinit getting called before BSS init
Diffstat (limited to 'wpa_supplicant/bss.c')
-rw-r--r--wpa_supplicant/bss.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 3d2a13b..a826056 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -260,6 +260,8 @@ void wpa_bss_deinit(struct wpa_supplicant *wpa_s)
{
struct wpa_bss *bss, *n;
eloop_cancel_timeout(wpa_bss_timeout, wpa_s, NULL);
+ if (wpa_s->bss.next == NULL)
+ return; /* BSS table not yet initialized */
dl_list_for_each_safe(bss, n, &wpa_s->bss, struct wpa_bss, list)
wpa_bss_remove(wpa_s, bss);
}