aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_sim.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_sim.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_sim.c')
-rw-r--r--src/eap_server/eap_server_sim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eap_server/eap_server_sim.c b/src/eap_server/eap_server_sim.c
index f83c3cb..b531241 100644
--- a/src/eap_server/eap_server_sim.c
+++ b/src/eap_server/eap_server_sim.c
@@ -117,6 +117,7 @@ static struct wpabuf * eap_sim_build_start(struct eap_sm *sm,
eap_sim_msg_add(msg, EAP_SIM_AT_ANY_ID_REQ, 0, NULL, 0);
} else if (data->start_round > 3) {
/* Cannot use more than three rounds of Start messages */
+ eap_sim_msg_free(msg);
return NULL;
} else if (data->start_round == 0) {
/*