From: Todd Lyons Date: Thu, 31 Oct 2013 13:04:27 +0000 (-0700) Subject: Only unbind ldap connection if bind succeeded X-Git-Tag: exim-4_83_RC1~110 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ff2c417d0b970db22a382cb692d066d8fe3c32ae;p=exim.git Only unbind ldap connection if bind succeeded --- diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index bb29b43af..6129b4bfe 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -1367,7 +1367,8 @@ while ((lcp = ldap_connections) != NULL) { DEBUG(D_lookup) debug_printf("unbind LDAP connection to %s:%d\n", lcp->host, lcp->port); - ldap_unbind(lcp->ld); + if(lcp->bound == TRUE) + ldap_unbind(lcp->ld); ldap_connections = lcp->next; } }