From 6956e3d483cf62f04f3befecb997212a85c49fa4 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 21 Aug 2004 09:38:58 +0000 Subject: [PATCH] cleanup previous commit --- servers/slapd/entry.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 */ -- 2.39.5