]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8585 Fail ldap_result if handle is already bad
authorHoward Chu <hyc@symas.com>
Tue, 7 Feb 2017 12:56:35 +0000 (12:56 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 16 Mar 2017 16:04:07 +0000 (09:04 -0700)
libraries/libldap/result.c

index dd3b2b642653fd26429fdd67543db3ea98ef9516..fba8ff4397ab020adc3927325c6816a716ed4d9f 100644 (file)
@@ -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 );