diff options
author | Jouni Malinen <j@w1.fi> | 2012-04-01 17:55:20 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-04-01 17:55:20 +0300 |
commit | ca8e039fec1352e2ece4fdbd6fde92fd461565a3 (patch) | |
tree | 6891cb10ef25a9c85dedb2f00df04d285983a78d /radius_example | |
parent | 8c6f80e02345f628aff7183df4532144848a30f7 (diff) | |
download | external_wpa_supplicant_8_ti-ca8e039fec1352e2ece4fdbd6fde92fd461565a3.zip external_wpa_supplicant_8_ti-ca8e039fec1352e2ece4fdbd6fde92fd461565a3.tar.gz external_wpa_supplicant_8_ti-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 'radius_example')
-rw-r--r-- | radius_example/radius_example.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/radius_example/radius_example.c b/radius_example/radius_example.c index 066707f..cb0e154 100644 --- a/radius_example/radius_example.c +++ b/radius_example/radius_example.c @@ -88,7 +88,8 @@ static void start_example(void *eloop_ctx, void *timeout_ctx) return; } - radius_client_send(ctx->radius, msg, RADIUS_AUTH, NULL); + if (radius_client_send(ctx->radius, msg, RADIUS_AUTH, NULL) < 0) + radius_msg_free(msg); } |