From: Pierangelo Masarati Date: Mon, 19 Sep 2005 09:06:29 +0000 (+0000) Subject: use result of validation (ITS#4028) X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~408 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae0b39e3cc9dd0f982e87c16c9e821d074319693;p=openldap use result of validation (ITS#4028) --- diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index f1521b9b92..1f1408d19c 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -1054,11 +1054,29 @@ meta_send_entry( &attr->a_vals[i] ); } + if ( rc ) { + LBER_FREE( attr->a_vals[i].bv_val ); + if ( --last == i ) { + BER_BVZERO( &attr->a_vals[ i ] ); + break; + } + attr->a_vals[i] = attr->a_vals[last]; + BER_BVZERO( &attr->a_vals[last] ); + i--; + continue; + } + if ( pretty ) { LBER_FREE( attr->a_vals[i].bv_val ); attr->a_vals[i] = pval; } } + + if ( last == 0 ) { + ch_free( attr->a_vals ); + ch_free( attr ); + goto next_attr; + } } if ( last && attr->a_desc->ad_type->sat_equality &&