From: Howard Chu Date: Sun, 9 Apr 2017 14:39:44 +0000 (+0100) Subject: Fixup handle_pause() X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=13c39b98b5566b476171726edb754186b78a0329;p=openldap Fixup handle_pause() Return -1 if running on the main thread - which means there are no worker threads to pause. --- 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 */