]> git.sur5r.net Git - openldap/commitdiff
Fixes memory leaks in do_compare()
authorStig Venaas <venaas@openldap.org>
Sat, 10 Nov 2001 23:34:03 +0000 (23:34 +0000)
committerStig Venaas <venaas@openldap.org>
Sat, 10 Nov 2001 23:34:03 +0000 (23:34 +0000)
servers/slapd/compare.c

index 2f4f03f6aed3f49bff2dbe7188fa4c08dec2c4fa..77942684c364fef52aafe1c056f1dd4ae072c827 100644 (file)
@@ -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;