From: Howard Chu Date: Tue, 7 Feb 2017 12:56:35 +0000 (+0000) Subject: ITS#8585 Fail ldap_result if handle is already bad X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9773f43b11aa8fac51407694bbdcd17830f206d5;p=openldap ITS#8585 Fail ldap_result if handle is already bad --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index dd3b2b6426..fba8ff4397 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -113,6 +113,9 @@ ldap_result( Debug( LDAP_DEBUG_TRACE, "ldap_result ld %p msgid %d\n", (void *)ld, msgid, 0 ); + if (ld->ld_errno == LDAP_LOCAL_ERROR || ld->ld_errno == LDAP_SERVER_DOWN) + return -1; + LDAP_MUTEX_LOCK( &ld->ld_res_mutex ); rc = wait4msg( ld, msgid, all, timeout, result ); LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );