diff options
author | Todd Lyons <tlyons@exim.org> | 2013-10-31 06:04:27 -0700 |
---|---|---|
committer | Todd Lyons <tlyons@exim.org> | 2013-10-31 06:04:27 -0700 |
commit | ff2c417d0b970db22a382cb692d066d8fe3c32ae (patch) | |
tree | b63b2b83f812112ba2c56b50c4ace7e84ef0a7bb /src | |
parent | 69aca2feaca1ebbc55c6f1adaee4738dc328ae90 (diff) |
Only unbind ldap connection if bind succeeded
Diffstat (limited to 'src')
-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; } } |