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-Tag: OPENLDAP_REL_ENG_2_4_45~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e2cf8cae7bec60d0430328c06e8002b2c17572b;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 );