aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-13 22:47:14 +0200
committerJouni Malinen <j@w1.fi>2011-11-13 22:47:14 +0200
commit7adc3c129657edb36134ae321b5f45ddb2cd9cdb (patch)
tree0d198c13ec50cf2337cb8b72a8ea6d96a31517ce /src/eap_peer
parent4c8a333b54764d6b6f38770c4668cf2bfb84da92 (diff)
downloadexternal_wpa_supplicant_8_ti-7adc3c129657edb36134ae321b5f45ddb2cd9cdb.zip
external_wpa_supplicant_8_ti-7adc3c129657edb36134ae321b5f45ddb2cd9cdb.tar.gz
external_wpa_supplicant_8_ti-7adc3c129657edb36134ae321b5f45ddb2cd9cdb.tar.bz2
Make phase2_method initialization easier for static analyzers
data->phase2_method cannot really be NULL if eap_fast_init_phase2_method() returns success, but this construction seems to be too difficult for some static analyzers. While this change is not really needed in practice, it makes it easier to go through warnings from such analyzers. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap_fast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 8bd4678..3cfb41a 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -444,8 +444,9 @@ static int eap_fast_phase2_request(struct eap_sm *sm,
return 0;
}
- if (data->phase2_priv == NULL &&
- eap_fast_init_phase2_method(sm, data) < 0) {
+ if ((data->phase2_priv == NULL &&
+ eap_fast_init_phase2_method(sm, data) < 0) ||
+ data->phase2_method == NULL) {
wpa_printf(MSG_INFO, "EAP-FAST: Failed to initialize "
"Phase 2 EAP method %d", *pos);
ret->methodState = METHOD_DONE;