diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index cc07664c90..cab753e881 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -151,7 +151,7 @@ int ldap_int_get_controls( return LDAP_NO_MEMORY; } - ctrls[nctrls] = NULL; + *ctrls[nctrls] = NULL; for( tag = ber_first_element( ber, &len, &opaque ); tag != LBER_ERROR; diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index d5c4775a73..f906b4068d 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -75,7 +75,7 @@ int get_ctrls( } #endif - ctrls[nctrls] = NULL; + *ctrls[nctrls] = NULL; for( tag = ber_first_element( ber, &len, &opaque ); tag != LBER_ERROR;