Remove lock in ThreadPoolInit
If ThreadPoolInit returned EAGAIN, tp->lock was not freed. (cherry picked from commit d45f3c28cfb9e1fe167bea66ef0fdd0d0b218bb3)
This commit is contained in:
parent
404867107d
commit
24f12e3ce0
@ -318,6 +318,12 @@ Version 1.8.0
|
||||
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…
x
Reference in New Issue
Block a user