X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/69aca2feaca1ebbc55c6f1adaee4738dc328ae90..ff2c417d0b970db22a382cb692d066d8fe3c32ae:/src/src/lookups/ldap.c 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; } }