From 601dbb2b70d61e4bc3ab99916e0d4b3e543fdf3b Mon Sep 17 00:00:00 2001 From: venaas Date: Wed, 19 Sep 2007 12:59:37 +0000 Subject: fixed alignment problem and a memory leak git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.0@163 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radsecproxy.c b/radsecproxy.c index c217894..57801b9 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1204,12 +1204,14 @@ void radsrv(struct request *rq) { if (code == RAD_Status_Server) { respondstatusserver(rq); + free(buf); return; } if (!to) { debug(DBG_INFO, "radsrv: sending reject to %s for %s", rq->from->peer.host, username); respondreject(rq, realm->message); + free(buf); return; } @@ -1351,7 +1353,7 @@ void *clientrd(void *arg) { if (ATTRVALLEN(attr) <= 4) break; - if (((uint16_t *)attr)[1] != 0 || ntohs(((uint16_t *)attr)[2]) != 311) /* 311 == MS */ + if (attr[2] != 0 || attr[3] != 0 || attr[4] != 1 || attr[5] != 55) /* 311 == MS */ continue; sublen = ATTRVALLEN(attr) - 4; -- cgit v1.1