From ecd99b83dd8fe968ef549414d5cc7e42d79cc4e3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 17 Aug 2005 08:13:24 +0000 Subject: [PATCH] set "matched" as appropriate (ITS#3942) --- servers/slapd/back-ldap/search.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 85c334f9c9..ff9425bb57 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -394,6 +394,15 @@ fail:; BER_BVZERO( &rs->sr_ref[ cnt ] ); } + if ( match.bv_val != NULL ) { + if ( match.bv_val[ 0 ] == '\0' ) { + LDAP_FREE( match.bv_val ); + BER_BVZERO( &match ); + } else { + match.bv_len = strlen( match.bv_val ); + } + } + /* cleanup */ if ( references ) { ldap_value_free( references ); -- 2.39.5