Fix leak pointed out by christian.lorenz@suse.de (ITS#614)

This commit is contained in:
Kurt Zeilenga 2000-07-04 20:27:59 +00:00
parent d4d03e36e5
commit d7c4b4c4e7

View File

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