]> granicus.if.org Git - apache/commitdiff
If the search fails due to a bad connection, make sure that we unbind the connection...
authorBradley Nicholes <bnicholes@apache.org>
Mon, 28 Feb 2005 23:25:26 +0000 (23:25 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 28 Feb 2005 23:25:26 +0000 (23:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@155713 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index 09bcd9fa490de9c120d6bd0b9594a1b2fc7ab28e..3a561fa85ccb163dae8985f0199517f7e2513101 100644 (file)
@@ -1118,9 +1118,9 @@ start_over:
     if ((result = ldap_search_ext_s(ldc->ldap,
                                    (char *)basedn, scope,
                                     (char *)filter, attrs, 0, 
-                                   NULL, NULL,
-                                    NULL, -1, &res)) == LDAP_SERVER_DOWN) {
+                                   NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN) {
         ldc->reason = "ldap_search_ext_s() for user failed with server down";
+        util_ldap_connection_unbind(ldc);
         goto start_over;
     }