fix entry DN free

This commit is contained in:
Pierangelo Masarati 2005-05-21 14:53:05 +00:00
parent f103589cc3
commit be53e82650
2 changed files with 6 additions and 4 deletions

View File

@ -275,8 +275,8 @@ fail:;
rs->sr_operational_attrs = NULL;
rs->sr_flags = 0;
abort = send_search_entry( op, rs );
if ( !BER_BVISNULL( &ent.e_name ) && ( ent.e_name.bv_val != bdn.bv_val ) )
{
if ( !BER_BVISNULL( &ent.e_name ) ) {
assert( ent.e_name.bv_val != bdn.bv_val );
free( ent.e_name.bv_val );
BER_BVZERO( &ent.e_name );
}

View File

@ -942,8 +942,10 @@ meta_send_entry(
rs->sr_entry = NULL;
rs->sr_attrs = NULL;
if ( !BER_BVISNULL( &ent.e_name ) && ent.e_name.bv_val != bdn.bv_val ) {
free( ent.e_name.bv_val );
if ( !BER_BVISNULL( &ent.e_name ) ) {
if ( ent.e_name.bv_val != bdn.bv_val ) {
free( ent.e_name.bv_val );
}
BER_BVZERO( &ent.e_name );
}
if ( !BER_BVISNULL( &ent.e_nname ) ) {