aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_aka.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-11-11 11:15:49 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-11 11:15:49 (GMT)
commit58fd49c05d2bde5c04dc1dc1eede146b43992feb (patch)
tree51f2d2f0efeb2b870e87c792bc08fbed73365531 /src/eap_server/eap_server_aka.c
parent8cd93a01a9dd9a391fcd3265e805c8af9173772c (diff)
downloadhostap-58fd49c05d2bde5c04dc1dc1eede146b43992feb.zip
hostap-58fd49c05d2bde5c04dc1dc1eede146b43992feb.tar.gz
hostap-58fd49c05d2bde5c04dc1dc1eede146b43992feb.tar.bz2
EAP-SIM/AKA server: Fix memory leak in error path
If identity round limit is reached, EAP-SIM/AKA session is terminated. This needs to free the allocated message. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_server/eap_server_aka.c')
-rw-r--r--src/eap_server/eap_server_aka.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eap_server/eap_server_aka.c b/src/eap_server/eap_server_aka.c
index a965cac..177b58d 100644
--- a/src/eap_server/eap_server_aka.c
+++ b/src/eap_server/eap_server_aka.c
@@ -365,6 +365,7 @@ static struct wpabuf * eap_aka_build_identity(struct eap_sm *sm,
eap_sim_msg_add(msg, EAP_SIM_AT_ANY_ID_REQ, 0, NULL, 0);
} else if (data->identity_round > 3) {
/* Cannot use more than three rounds of Identity messages */
+ eap_sim_msg_free(msg);
return NULL;
} else if (sm->identity && sm->identity_len > 0 &&
(sm->identity[0] == EAP_AKA_REAUTH_ID_PREFIX ||