From 6775e25ba3ec12ba490f613b718f9d4876900514 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 18 Oct 2007 06:52:54 +0000 Subject: [PATCH] In pool_resume don't touch the condvar if the pool is tearing down. --- libraries/libldap_r/tpool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/libldap_r/tpool.c b/libraries/libldap_r/tpool.c index 6884f32fc3..06124de96c 100644 --- a/libraries/libldap_r/tpool.c +++ b/libraries/libldap_r/tpool.c @@ -702,7 +702,8 @@ ldap_pvt_thread_pool_resume ( ldap_pvt_thread_mutex_lock(&pool->ltp_mutex); pool->ltp_pause = 0; - ldap_pvt_thread_cond_broadcast(&pool->ltp_cond); + if (pool->ltp_state == LDAP_INT_THREAD_POOL_RUNNING) + ldap_pvt_thread_cond_broadcast(&pool->ltp_cond); ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex); return(0); } -- 2.39.5