From: Kurt Zeilenga Date: Tue, 4 Jul 2000 20:27:59 +0000 (+0000) Subject: Fix leak pointed out by christian.lorenz@suse.de (ITS#614) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2483 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d7c4b4c4e7821444c30a8fbb161d9225474240b0;p=openldap Fix leak pointed out by christian.lorenz@suse.de (ITS#614) --- diff --git a/servers/slapd/ava.c b/servers/slapd/ava.c index 4b797978fa..1b57254f6b 100644 --- a/servers/slapd/ava.c +++ b/servers/slapd/ava.c @@ -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;