[PATCH 2/3] mesh: Fix SEGV on error path
Masashi Honma
masashi.honma
Wed Aug 26 01:32:38 PDT 2015
When wpa_init() in __mesh_rsn_auth_init() failed, empty rsn->auth causes SEGV.
This patch fixes the issue.
Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
src/ap/wpa_auth.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index 4fead13..4c05089 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -502,6 +502,9 @@ void wpa_deinit(struct wpa_authenticator *wpa_auth)
{
struct wpa_group *group, *prev;
+ if (wpa_auth == NULL)
+ return;
+
eloop_cancel_timeout(wpa_rekey_gmk, wpa_auth, NULL);
eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
--
2.1.4
More information about the Hostap
mailing list