From 13c39b98b5566b476171726edb754186b78a0329 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 9 Apr 2017 15:39:44 +0100 Subject: [PATCH] Fixup handle_pause() Return -1 if running on the main thread - which means there are no worker threads to pause. --- libraries/libldap_r/tpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/libldap_r/tpool.c b/libraries/libldap_r/tpool.c index b785631213..1b6087f2b8 100644 --- a/libraries/libldap_r/tpool.c +++ b/libraries/libldap_r/tpool.c @@ -1031,6 +1031,8 @@ handle_pause( ldap_pvt_thread_pool_t *tpool, int pause_type ) { ldap_int_thread_userctx_t *ctx = ldap_pvt_thread_pool_context(); pq = ctx->ltu_pq; + if ( !pq ) + return(-1); } /* Let pool_unidle() ignore requests for new pauses */ -- 2.39.5