projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f029c44
)
mesh: Fix segfault on error path
author
Masashi Honma
<masashi.honma@gmail.com>
Wed, 26 Aug 2015 08:32:38 +0000
(17:32 +0900)
committer
Jouni Malinen
<j@w1.fi>
Sat, 5 Sep 2015 18:31:25 +0000
(21:31 +0300)
When wpa_init() in __mesh_rsn_auth_init() failed, empty rsn->auth caused
segmentation fault due to NULL pointer dereference when wpa_deinit() was
called. Fix this by checking the pointer before executing deinit steps.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
wpa_supplicant/mesh_rsn.c
patch
|
blob
|
history
diff --git
a/wpa_supplicant/mesh_rsn.c
b/wpa_supplicant/mesh_rsn.c
index
a140b97
..
9dce32f
100644
(file)
--- a/
wpa_supplicant/mesh_rsn.c
+++ b/
wpa_supplicant/mesh_rsn.c
@@
-190,7
+190,8
@@
static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr)
static void mesh_rsn_deinit(struct mesh_rsn *rsn)
{
os_memset(rsn->mgtk, 0, sizeof(rsn->mgtk));
- wpa_deinit(rsn->auth);
+ if (rsn->auth)
+ wpa_deinit(rsn->auth);
}