summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ads_struct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 83c8f5b404..15cbb328e8 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -178,7 +178,9 @@ ADS_STRUCT *ads_init(const char *realm,
void ads_destroy(ADS_STRUCT **ads)
{
if (ads && *ads) {
+#if HAVE_LDAP
if ((*ads)->ld) ldap_unbind((*ads)->ld);
+#endif
SAFE_FREE((*ads)->realm);
SAFE_FREE((*ads)->ldap_server);
SAFE_FREE((*ads)->kdc_server);