From a116c2fb5e6d5691dcdd5e129a41e38d36193c02 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Tue, 21 Sep 2004 03:08:07 +0000 Subject: [PATCH] a memory fix for slap_mods2entry(): don't trim mods array - trim it outside --- servers/slapd/add.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index d4f6b6b914..17505c90a1 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -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; } -- 2.39.5