summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-07-30 20:43:46 +0200
committerLinus Nordberg <linus@nordu.net>2017-08-01 18:25:08 +0200
commitf9ea851f333ba325703d7e6e0da0a66f0ecd8163 (patch)
treee618460cadfdf5d150924ef3023add168f15a24f
parent2a75a2bb1353acd7b82cd33d3e4c2274b5e753b2 (diff)
Don't pthread_join unless we actually created a thread.
coverity: 1449504
-rw-r--r--radsecproxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 3a9c706..ccedc0d 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1915,7 +1915,8 @@ void *clientwr(void *arg) {
for (i = 0; i < MAX_REQUESTS; i++) {
if (server->clientrdgone) {
- pthread_join(clientrdth, NULL);
+ if (conf->pdef->connecter)
+ pthread_join(clientrdth, NULL);
goto errexit;
}