From: Pierangelo Masarati Date: Sat, 21 Aug 2004 09:38:58 +0000 (+0000) Subject: cleanup previous commit X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~675 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6956e3d483cf62f04f3befecb997212a85c49fa4;p=openldap cleanup previous commit --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 43269c14ff..a513f85927 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -424,18 +424,18 @@ entry_clean( Entry *e ) e->e_private = NULL; /* free DNs */ - if ( e->e_dn != NULL ) { - free( e->e_dn ); - e->e_dn = NULL; + if ( !BER_BVISNULL( &e->e_name ) ) { + free( e->e_name.bv_val ); + BER_BVZERO( &e->e_name ); } - if ( e->e_ndn != NULL ) { - free( e->e_ndn ); - e->e_ndn = NULL; + if ( !BER_BVISNULL( &e->e_nname ) ) { + free( e->e_nname.bv_val ); + BER_BVZERO( &e->e_nname ); } - if ( e->e_bv.bv_val != NULL ) { + if ( !BER_BVISNULL( &e->e_bv ) ) { free( e->e_bv.bv_val ); - e->e_bv.bv_val = NULL; + BER_BVZERO( &e->e_bv ); } /* free attributes */