Fix coverity warning.

- Mutex was left locked when malloc failed. Fixed.
This commit is contained in:
Ari Koivula 2015-05-04 17:16:53 +03:00
parent 1c3873f5b2
commit 1c6c4963e7

View file

@ -294,6 +294,7 @@ int threadqueue_init(threadqueue_queue_t * const threadqueue, int thread_count,
threadqueue->threads_running++;
} else {
fprintf(stderr, "Could not allocate threadqueue_worker_spec structure!\n");
PTHREAD_UNLOCK(&threadqueue->lock);
return 0;
}
}