diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 98902ae156..e2eb60aed6 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -436,6 +436,7 @@ slap_modrdn2mods( /* Apply modification */ mod_tmp = ( Modifications * )ch_malloc( sizeof( Modifications ) ); mod_tmp->sml_desc = desc; + BER_BVZERO( &mod_tmp->sml_type ); mod_tmp->sml_values = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) ); ber_dupbv( &mod_tmp->sml_values[0], &new_rdn[a_cnt]->la_value ); mod_tmp->sml_values[1].bv_val = NULL; @@ -476,6 +477,7 @@ slap_modrdn2mods( /* Apply modification */ mod_tmp = ( Modifications * )ch_malloc( sizeof( Modifications ) ); mod_tmp->sml_desc = desc; + BER_BVZERO( &mod_tmp->sml_type ); mod_tmp->sml_values = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) ); ber_dupbv( &mod_tmp->sml_values[0], &old_rdn[d_cnt]->la_value ); mod_tmp->sml_values[1].bv_val = NULL; diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 74a2bdee43..58c8694036 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -2717,7 +2717,6 @@ LDAPMod **slapi_int_modifications2ldapmods( Modifications *modlist ) modp->mod_type = slapi_ch_strdup( ml->sml_desc->ad_cname.bv_val ); } else { modp->mod_type = slapi_ch_strdup( ml->sml_type.bv_val ); - BER_BVZERO( &ml->sml_type ); } if ( ml->sml_values != NULL ) {