From: Howard Chu Date: Mon, 14 Apr 2003 12:27:04 +0000 (+0000) Subject: Fix value_find_ex result X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~364 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0816ec503963053f537e83278654a3c6f5f5f51;p=openldap Fix value_find_ex result --- diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 3da4bc511f..8988171b43 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -235,7 +235,6 @@ int value_find_ex( } } - rc = LDAP_NO_SUCH_ATTRIBUTE; for ( i = 0; vals[i].bv_val != NULL; i++ ) { int match; const char *text; @@ -244,10 +243,11 @@ int value_find_ex( &vals[i], nval.bv_val == NULL ? val : &nval, &text ); if( rc == LDAP_SUCCESS && match == 0 ) { - break; + sl_free( nval.bv_val, ctx ); + return rc; } } sl_free( nval.bv_val, ctx ); - return rc; + return LDAP_NO_SUCH_ATTRIBUTE; }