diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
commit | 60c44471bf25f9e84d8701afe1bbcbcc88e18c89 (patch) | |
tree | 538db23d436787038f980271529ae2be44235c1b /src/eap_peer/eap_tnc.c | |
parent | ced3a3de988600636bda6479d27de8823307f171 (diff) | |
download | FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.zip FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.tar.gz |
Import wpa_supplicant & hostapd 0.6.9.
Diffstat (limited to 'src/eap_peer/eap_tnc.c')
-rw-r--r-- | src/eap_peer/eap_tnc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/eap_peer/eap_tnc.c b/src/eap_peer/eap_tnc.c index 0a3a01c..c560015 100644 --- a/src/eap_peer/eap_tnc.c +++ b/src/eap_peer/eap_tnc.c @@ -295,7 +295,7 @@ static struct wpabuf * eap_tnc_process(struct eap_sm *sm, void *priv, wpa_printf(MSG_DEBUG, "EAP-TNC: Server did not use " "start flag in the first message"); ret->ignore = TRUE; - return NULL; + goto fail; } tncc_init_connection(data->tncc); @@ -308,7 +308,7 @@ static struct wpabuf * eap_tnc_process(struct eap_sm *sm, void *priv, wpa_printf(MSG_DEBUG, "EAP-TNC: Server used start " "flag again"); ret->ignore = TRUE; - return NULL; + goto fail; } res = tncc_process_if_tnccs(data->tncc, @@ -317,7 +317,7 @@ static struct wpabuf * eap_tnc_process(struct eap_sm *sm, void *priv, switch (res) { case TNCCS_PROCESS_ERROR: ret->ignore = TRUE; - return NULL; + goto fail; case TNCCS_PROCESS_OK_NO_RECOMMENDATION: case TNCCS_RECOMMENDATION_ERROR: wpa_printf(MSG_DEBUG, "EAP-TNC: No " @@ -404,6 +404,11 @@ static struct wpabuf * eap_tnc_process(struct eap_sm *sm, void *priv, data->out_buf = resp; data->state = PROC_MSG; return eap_tnc_build_msg(data, ret, id); + +fail: + if (data->in_buf == &tmpbuf) + data->in_buf = NULL; + return NULL; } |