summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/ldap/ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 42cad3a63e..c1fc461b5f 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -1332,7 +1332,9 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg)
}
- ctrl[i] = NULL;
+ if (ctrl != NULL) {
+ ctrl[i] = NULL;
+ }
msg->controls = ctrl;