]> git.sur5r.net Git - openldap/commitdiff
Fix leak pointed out by christian.lorenz@suse.de (ITS#614)
authorKurt Zeilenga <kurt@openldap.org>
Tue, 4 Jul 2000 20:27:59 +0000 (20:27 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 4 Jul 2000 20:27:59 +0000 (20:27 +0000)
servers/slapd/ava.c

index 4b797978fa5324a9112e163346b73114f6f4b872..1b57254f6b88d42b27073f30854263ba0eab1c05 100644 (file)
@@ -53,9 +53,9 @@ get_ava(
        aa->aa_value = NULL;
 
        rc = slap_bv2ad( &type, &aa->aa_desc, text );
+       ch_free( type.bv_val );
 
        if( rc != LDAP_SUCCESS ) {
-               ch_free( type.bv_val );
                ch_free( value.bv_val );
                ch_free( aa );
                return rc;
@@ -65,7 +65,6 @@ get_ava(
        ch_free( value.bv_val );
 
        if( rc != LDAP_SUCCESS ) {
-               ch_free( type.bv_val );
                ad_free( aa->aa_desc, 1 );
                ch_free( aa );
                return rc;