diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 2f4f03f6ae..77942684c3 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -135,13 +135,13 @@ do_compare( rc = slap_bv2ad( &desc, &ava.aa_desc, &text ); if( rc != LDAP_SUCCESS ) { send_ldap_result( conn, op, rc, NULL, text, NULL, NULL ); - return rc; + goto cleanup; } rc = value_normalize( ava.aa_desc, SLAP_MR_EQUALITY, &value, &nvalue, &text ); if( rc != LDAP_SUCCESS ) { send_ldap_result( conn, op, rc, NULL, text, NULL, NULL ); - return rc; + goto cleanup; } ava.aa_value = nvalue;