From: Pierangelo Masarati Date: Wed, 17 Aug 2005 08:13:24 +0000 (+0000) Subject: set "matched" as appropriate (ITS#3942) X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~694 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ecd99b83dd8fe968ef549414d5cc7e42d79cc4e3;p=openldap set "matched" as appropriate (ITS#3942) --- 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 );