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 */