From: Howard Chu Date: Wed, 26 Feb 2003 09:55:07 +0000 (+0000) Subject: Fix modify_delete_values. This stuff should be completely rewritten X-Git-Tag: NO_SLAP_OP_BLOCKS~288 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d0dadc0bf40a0be07ba1d8a35e0f2cd7f879038;p=openldap Fix modify_delete_values. This stuff should be completely rewritten to take full advantage of SLAP_NVALUES. --- diff --git a/servers/slapd/mods.c b/servers/slapd/mods.c index 72a8e60308..0fed9643b4 100644 --- a/servers/slapd/mods.c +++ b/servers/slapd/mods.c @@ -615,6 +615,12 @@ modify_delete_values( if ( j != k ) { a->a_vals[ j ] = a->a_vals[ k ]; +#ifdef SLAP_NVALUES + if (a->a_nvals) { + free( a->a_nvals[j].bv_val ); + a->a_nvals[ j ] = a->a_nvals[ k ]; + } +#endif } if ( a->a_vals[ k ].bv_val == NULL ) { @@ -622,6 +628,9 @@ modify_delete_values( } } a->a_vals[ j ].bv_val = NULL; +#ifdef SLAP_NVALUES + a->a_nvals[ j ].bv_val = NULL; +#endif assert( i == k - j );