summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-07-30 21:47:24 +0200
committerLinus Nordberg <linus@nordu.net>2017-07-30 21:47:24 +0200
commitc329d323515fa2ad25b10cc2fc294f33635ed639 (patch)
tree02ab85c57ff9c76056248974fe6c895fed454428 /radsecproxy.c
parentc2624d484fd8034bd498d0573e43baee7faceae4 (diff)
Dont deref 'to' if it's NULL.
coverity: 1450948
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c3
1 files changed, 2 insertions, 1 deletions
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);
}