From c329d323515fa2ad25b10cc2fc294f33635ed639 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(-) (limited to 'radsecproxy.c') diff --git a/radsecproxy.c b/radsecproxy.c index 368a2a5..c647ab1 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -538,7 +538,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