From 8aef6cf8292b805db7a8b118fb584058cdfab97e Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 30 Jul 2017 21:47:24 +0200 Subject: Dont deref 'to' if it's NULL. coverity: 1450948 --- radsecproxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radsecproxy.c b/radsecproxy.c index a62d3e6..778d3b7 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -537,7 +537,8 @@ errexit: if (rq->from) rmclientrq(rq, rq->msg->id); freerq(rq); - pthread_mutex_unlock(&to->newrq_mutex); + if (to) + pthread_mutex_unlock(&to->newrq_mutex); removeclientrqs_sendrq_freeserver_lock(0); } -- cgit v1.1