summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorFabian Mauchle <fabian.mauchle@switch.ch>2017-02-27 17:40:24 +0100
committerLinus Nordberg <linus@nordu.net>2017-03-10 14:27:49 +0100
commit3d9be8431e7644e440c58b7132563db0ace0267b (patch)
tree93c9e7d6453265bd7924aee897b5e2c1a08145ef /radsecproxy.c
parentf3619bf65967255e1009fec42b28007b49e0f4e4 (diff)
make sure rq->to is set to NULL when cleaning up server output queue
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 4e4caad..fe76f7c 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -289,8 +289,6 @@ void freeserver(struct server *server, uint8_t destroymutex) {
if (server->requests) {
rqout = server->requests;
for (end = rqout + MAX_REQUESTS; rqout < end; rqout++) {
- if (rqout->rq)
- rqout->rq->to = NULL;
freerqoutdata(rqout);
pthread_mutex_destroy(rqout->lock);
free(rqout->lock);
@@ -421,6 +419,7 @@ void freerqoutdata(struct rqout *rqout) {
free(rqout->rq->buf);
rqout->rq->buf = NULL;
}
+ rqout->rq->to = NULL;
freerq(rqout->rq);
rqout->rq = NULL;
}