mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 05:30:07 -05:00
a memory fix for slap_mods2entry(): don't trim mods array - trim it outside
This commit is contained in:
parent
89b03a1c7e
commit
a116c2fb5e
1 changed files with 0 additions and 8 deletions
|
|
@ -425,10 +425,6 @@ slap_mods2entry(
|
|||
AC_MEMCPY( &attr->a_vals[i], mods->sml_values,
|
||||
sizeof( struct berval ) * j );
|
||||
|
||||
/* trim the mods array */
|
||||
ch_free( mods->sml_values );
|
||||
mods->sml_values = NULL;
|
||||
|
||||
if( mods->sml_nvalues ) {
|
||||
attr->a_nvals = ch_realloc( attr->a_nvals,
|
||||
sizeof( struct berval ) * (i+j) );
|
||||
|
|
@ -436,10 +432,6 @@ slap_mods2entry(
|
|||
AC_MEMCPY( &attr->a_nvals[i], mods->sml_nvalues,
|
||||
sizeof( struct berval ) * j );
|
||||
|
||||
/* trim the mods array */
|
||||
ch_free( mods->sml_nvalues );
|
||||
mods->sml_nvalues = NULL;
|
||||
|
||||
} else {
|
||||
attr->a_nvals = attr->a_vals;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue