diff options
-rw-r--r-- | src/src/lookups/ldap.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } } |