r14423: don't die on no controls
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Mar 2006 05:30:39 +0000 (05:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:21 +0000 (13:57 -0500)
source/libcli/ldap/ldap.c

index 42cad3a63edb78936108682fa1c04b316bdf7e43..c1fc461b5f69ece9f8519172ce3f9106af0b9433 100644 (file)
@@ -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;