/* 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;
                        /* 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;
 
                        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 ) {