From 6d0dadc0bf40a0be07ba1d8a35e0f2cd7f879038 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 26 Feb 2003 09:55:07 +0000 Subject: [PATCH] Fix modify_delete_values. This stuff should be completely rewritten to take full advantage of SLAP_NVALUES. --- servers/slapd/mods.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ); -- 2.39.5