summaryrefslogtreecommitdiff
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
parentf3619bf65967255e1009fec42b28007b49e0f4e4 (diff)
make sure rq->to is set to NULL when cleaning up server output queue
-rw-r--r--ChangeLog1
-rw-r--r--radsecproxy.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6247aa4..3195603 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@ Changes between 1.6.8 and the master branch
- Make clang less unhappy.
- Don't use a smaller pthread stack size than what's allowed.
- Don't follow NULL the pointer at debug level 5 (RADSECPROXY-68).
+ - Avoid a deadlock situation with dynamic servers (RADSECPROXY-73).
2016-09-21 1.6.8
Bug fixes:
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;
}