aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/eapol_test.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-04-01 14:55:20 (GMT)
committerJouni Malinen <j@w1.fi>2012-04-01 14:55:20 (GMT)
commitca8e039fec1352e2ece4fdbd6fde92fd461565a3 (patch)
tree6891cb10ef25a9c85dedb2f00df04d285983a78d /wpa_supplicant/eapol_test.c
parent8c6f80e02345f628aff7183df4532144848a30f7 (diff)
downloadhostap-ca8e039fec1352e2ece4fdbd6fde92fd461565a3.zip
hostap-ca8e039fec1352e2ece4fdbd6fde92fd461565a3.tar.gz
hostap-ca8e039fec1352e2ece4fdbd6fde92fd461565a3.tar.bz2
Fix memory leaks on radius_client_send error paths
In case this function returns an error, the RADIUS message needs to freed in the caller. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/eapol_test.c')
-rw-r--r--wpa_supplicant/eapol_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
index e92dc12..e53e156 100644
--- a/wpa_supplicant/eapol_test.c
+++ b/wpa_supplicant/eapol_test.c
@@ -278,7 +278,9 @@ static void ieee802_1x_encapsulate_radius(struct eapol_test_data *e,
}
}
- radius_client_send(e->radius, msg, RADIUS_AUTH, e->wpa_s->own_addr);
+ if (radius_client_send(e->radius, msg, RADIUS_AUTH, e->wpa_s->own_addr)
+ < 0)
+ goto fail;
return;
fail: