git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103678
13f79535-47bb-0310-9956-
ffa450edef68
break;
}
- ldc->bound = 1;
- ldc->reason = "LDAP: connection open successful";
-
/* free the handle if there was an error
*/
if (LDAP_SUCCESS != result)
ldc->bound = 0;
ldc->reason = "LDAP: ldap_simple_bind_s() failed";
}
+ else {
+ ldc->bound = 1;
+ ldc->reason = "LDAP: connection open successful";
+ }
return(result);
}
if (result != LDAP_SUCCESS) {
ldc->reason = "ldap_simple_bind_s() to check user credentials failed";
ldap_msgfree(res);
+ ldap_unbind_s(ldc->ldap);
+ ldc->ldap = NULL;
+ ldc->bound = 0;
return result;
}
else {