summaryrefslogtreecommitdiff
path: root/source3/libads/ads_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ads_struct.c')
-rw-r--r--source3/libads/ads_struct.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index c66d4e84e8..c769d8ff48 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -141,9 +141,7 @@ void ads_destroy(ADS_STRUCT **ads)
is_mine = (*ads)->is_mine;
#if HAVE_LDAP
- if ((*ads)->ld) {
- ldap_unbind((*ads)->ld);
- }
+ ads_disconnect(*ads);
#endif
SAFE_FREE((*ads)->server.realm);
SAFE_FREE((*ads)->server.workgroup);