aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius/radius_client.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-19 14:34:41 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-19 14:34:41 (GMT)
commit9e7245bdb414dec167363b9178a37f4745afa595 (patch)
treebcb52c9731b1af430703926c1de98124465afcca /src/radius/radius_client.c
parentd94f86d85ef1a846ff91fe3c66b368c1d535352c (diff)
downloadhostap-9e7245bdb414dec167363b9178a37f4745afa595.zip
hostap-9e7245bdb414dec167363b9178a37f4745afa595.tar.gz
hostap-9e7245bdb414dec167363b9178a37f4745afa595.tar.bz2
Change radius_msg_free() to free the buffer
Since all callers were freeing the buffer immediately anyway, move this operation into radius_msg_free() to reduce code size.
Diffstat (limited to 'src/radius/radius_client.c')
-rw-r--r--src/radius/radius_client.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/radius/radius_client.c b/src/radius/radius_client.c
index 4cb9c39..0ace8d1 100644
--- a/src/radius/radius_client.c
+++ b/src/radius/radius_client.c
@@ -247,7 +247,6 @@ static int radius_client_init_auth(struct radius_client_data *radius);
static void radius_client_msg_free(struct radius_msg_list *req)
{
radius_msg_free(req->msg);
- os_free(req->msg);
os_free(req);
}
@@ -526,7 +525,6 @@ static void radius_client_list_add(struct radius_client_data *radius,
/* No point in adding entries to retransmit queue since event
* loop has already been terminated. */
radius_msg_free(msg);
- os_free(msg);
return;
}
@@ -534,7 +532,6 @@ static void radius_client_list_add(struct radius_client_data *radius,
if (entry == NULL) {
printf("Failed to add RADIUS packet into retransmit list\n");
radius_msg_free(msg);
- os_free(msg);
return;
}
@@ -802,7 +799,6 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx)
switch (res) {
case RADIUS_RX_PROCESSED:
radius_msg_free(msg);
- os_free(msg);
/* continue */
case RADIUS_RX_QUEUED:
radius_client_msg_free(req);
@@ -830,7 +826,6 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx)
fail:
radius_msg_free(msg);
- os_free(msg);
}