diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index 042dfe97a7..c9847a3b7d 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -434,7 +434,7 @@ ldap_create_control( return LDAP_NO_MEMORY; } - ctrl->ldctl_value = NULL; + BER_BVZERO(&ctrl->ldctl_value); if ( ber && ( ber_flatten2( ber, &ctrl->ldctl_value, 1 ) == -1 )) { LDAP_FREE( ctrl ); return LDAP_NO_MEMORY;