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:10:18 +0200
commitacb84e532506055e38be11ed000eb0e27d4aeb01 (patch)
treee70274bd97b971c0fe45a376a12d14c96ff56396
parentf049ddb9126195789f61f1127cf2ebaf8fe3950f (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 a52f6aa..9289354 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1834,7 +1834,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;
}