summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libads/ldap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 8c8401dff9..dc93bd556c 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1800,8 +1800,9 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname)
char *hostnameDN, *host;
int rc;
LDAPControl ldap_control;
- LDAPControl * pldap_control[] = {&ldap_control, 0};
+ LDAPControl * pldap_control[2] = {NULL, NULL};
+ pldap_control[0] = &ldap_control;
memset(&ldap_control, 0, sizeof(LDAPControl));
ldap_control.ldctl_oid = (char *)LDAP_SERVER_TREE_DELETE_OID;