Remove lock in ThreadPoolInit

If ThreadPoolInit returned EAGAIN, tp->lock was not freed.
This commit is contained in:
Fabrice Fontaine 2012-03-10 18:09:37 +01:00
parent 06660b6383
commit d45f3c28cf
2 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,12 @@
Version 1.6.16
*******************************************************************************
2012-03-10 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Remove lock in ThreadPoolInit
If ThreadPoolInit returned EAGAIN, tp->lock was not freed.
2012-03-10 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Improve ixml

View File

@ -707,6 +707,10 @@ int ThreadPoolInit(ThreadPool *tp, ThreadPoolAttr *attr)
retCode += ithread_cond_init(&tp->condition, NULL);
retCode += ithread_cond_init(&tp->start_and_shutdown, NULL);
if (retCode) {
ithread_mutex_unlock(&tp->mutex);
ithread_mutex_destroy(&tp->mutex);
ithread_cond_destroy(&tp->condition);
ithread_cond_destroy(&tp->start_and_shutdown);
return EAGAIN;
}
if (attr) {