Remove lock in ThreadPoolInit
If ThreadPoolInit returned EAGAIN, tp->lock was not freed.
This commit is contained in:
parent
06660b6383
commit
d45f3c28cf
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user