aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-06-07 16:26:41 (GMT)
committerJouni Malinen <j@w1.fi>2014-06-07 16:26:41 (GMT)
commitaa6bf6dabc8ac1310c74076c202a5f6302f7c0cc (patch)
treeea9faae58a0f21e03ed97f32bd4767e2384a26d0 /src/eapol_supp
parent4f4d51e059f3685adb0e2de195c83dd4a2e0729d (diff)
downloadhostap-aa6bf6dabc8ac1310c74076c202a5f6302f7c0cc.zip
hostap-aa6bf6dabc8ac1310c74076c202a5f6302f7c0cc.tar.gz
hostap-aa6bf6dabc8ac1310c74076c202a5f6302f7c0cc.tar.bz2
eap_proxy: Check sm != NULL more consistently
While it does not look like that eapol_sm_get_key() would ever be called with sm == NULL, the current implementation is inconsistent on whether that is allowed or not. Check sm != NULL consistently to avoid warnings from static analyzers. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eapol_supp')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 1004b1a..e00dea3 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1523,7 +1523,7 @@ int eapol_sm_get_key(struct eapol_sm *sm, u8 *key, size_t len)
size_t eap_len;
#ifdef CONFIG_EAP_PROXY
- if (sm->use_eap_proxy) {
+ if (sm && sm->use_eap_proxy) {
/* Get key from EAP proxy */
if (sm == NULL || !eap_proxy_key_available(sm->eap_proxy)) {
wpa_printf(MSG_DEBUG, "EAPOL: EAP key not available");