From: Stig Venaas Date: Sat, 10 Nov 2001 23:34:03 +0000 (+0000) Subject: Fixes memory leaks in do_compare() X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~885 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d717a7fb9fb1fed1e45d5419ed5a20352d290063;p=openldap Fixes memory leaks in do_compare() --- 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;