aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-09-05 18:35:16 (GMT)
committerJouni Malinen <j@w1.fi>2015-09-05 18:35:16 (GMT)
commit6f416c78676364daf2d10d147c56455770c7dcac (patch)
tree33704a28904720a063970d831e5aad17b555b816 /wpa_supplicant/ibss_rsn.c
parent2fca1f67cf4bc118dc615a49585add40751ca4d1 (diff)
downloadhostap-6f416c78676364daf2d10d147c56455770c7dcac.zip
hostap-6f416c78676364daf2d10d147c56455770c7dcac.tar.gz
hostap-6f416c78676364daf2d10d147c56455770c7dcac.tar.bz2
RSN IBSS: Fix segfault on error path
If wpa_init() fails, wpa_deinit(NULL) must not be called to avoid hitting a NULL pointer dereference. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index 6299191..d9d0ae7 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -697,7 +697,8 @@ void ibss_rsn_deinit(struct ibss_rsn *ibss_rsn)
ibss_rsn_free(prev);
}
- wpa_deinit(ibss_rsn->auth_group);
+ if (ibss_rsn->auth_group)
+ wpa_deinit(ibss_rsn->auth_group);
os_free(ibss_rsn);
}