summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorFabian Mauchle <fabian.mauchle@switch.ch>2017-02-27 17:40:24 +0100
committerFabian Mauchle <fabian.mauchle@switch.ch>2017-02-27 17:40:24 +0100
commit7b3596849ec738eddbb23a5c47bb8bb418393476 (patch)
tree3c3d7a8370de2e9c7b454f586c006e8e4874b7a9 /radsecproxy.c
parent9a565fe0289c55700677e7a6d8446a1de1e77e9e (diff)
make sure rq->to is set to NULL when cleaning up server output queueradsecproxy-73
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 815e927..92b0d35 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -319,8 +319,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);
@@ -455,6 +453,7 @@ void freerqoutdata(struct rqout *rqout) {
free(rqout->rq->buf);
rqout->rq->buf = NULL;
}
+ rqout->rq->to = NULL;
freerq(rqout->rq);
rqout->rq = NULL;
}