[PATCH] wpa_supplicant: null pointer check before pmksa_cache_flush
David Spinadel
dvdspndl
Thu Mar 7 01:12:01 PST 2013
From: David Spinadel <david.spinadel at intel.com>
Avoid segmentation fault in case of running wpa_supplicant w/o loaded driver.
Signed-hostap: David Spinadel <david.spinadel at intel.com>
---
src/rsn_supp/wpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index e50404c..3150dc3 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -2622,7 +2622,8 @@ void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr)
void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx)
{
#ifndef CONFIG_NO_WPA2
- pmksa_cache_flush(sm->pmksa, network_ctx);
+ if (sm)
+ pmksa_cache_flush(sm->pmksa, network_ctx);
#endif /* CONFIG_NO_WPA2 */
}
--
1.7.10.msysgit.1
More information about the Hostap
mailing list