From 3d9be8431e7644e440c58b7132563db0ace0267b Mon Sep 17 00:00:00 2001 From: Fabian Mauchle Date: Mon, 27 Feb 2017 17:40:24 +0100 Subject: make sure rq->to is set to NULL when cleaning up server output queue --- ChangeLog | 1 + radsecproxy.c | 3 +-- 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; } -- cgit v1.1