mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Initialize sml_type
Don't clobber sml_type when converting SLAPI mods
This commit is contained in:
parent
1c0f49dda3
commit
3f6daa4680
@ -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;
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user