]> git.sur5r.net Git - openldap/commitdiff
Allow ctrls argument to be NULL.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 28 Jun 1999 22:47:20 +0000 (22:47 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 28 Jun 1999 22:47:20 +0000 (22:47 +0000)
libraries/libldap/controls.c

index b609b7bc5660cd0c180fe2df01663248bda74c69..a5efc952dc352fa060b8ae8ed60fb6d0523c45d9 100644 (file)
@@ -117,8 +117,10 @@ int ldap_int_get_controls(
        char *opaque;
 
        assert( ber != NULL );
-       assert( ctrls != NULL );
 
+       if( ctrls == NULL ) {
+               return LDAP_SUCCESS;
+       }
        *ctrls = NULL;
 
        len = ber_pvt_ber_remaining(ber);
@@ -128,6 +130,7 @@ int ldap_int_get_controls(
                return LDAP_SUCCESS;
        }
 
+
        if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
                if( tag == LBER_ERROR ) {
                        /* decoding error */