]> git.sur5r.net Git - openldap/commitdiff
set "matched" as appropriate (ITS#3942)
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 08:13:24 +0000 (08:13 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 08:13:24 +0000 (08:13 +0000)
servers/slapd/back-ldap/search.c

index 85c334f9c98315df16e4eeae8aa1e08eca89b702..ff9425bb5734c76d2c153f5d05906416ef094398 100644 (file)
@@ -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 );