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>
This commit is contained in:
Jouni Malinen 2015-09-05 21:35:16 +03:00
parent 2fca1f67cf
commit 6f416c7867

View file

@ -697,6 +697,7 @@ void ibss_rsn_deinit(struct ibss_rsn *ibss_rsn)
ibss_rsn_free(prev);
}
if (ibss_rsn->auth_group)
wpa_deinit(ibss_rsn->auth_group);
os_free(ibss_rsn);