]> git.sur5r.net Git - openldap/commitdiff
cleanup previous commit
authorPierangelo Masarati <ando@openldap.org>
Sat, 21 Aug 2004 09:38:58 +0000 (09:38 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 21 Aug 2004 09:38:58 +0000 (09:38 +0000)
servers/slapd/entry.c

index 43269c14ffd8ef1f09d4da3b0bb20a644ecbdbcc..a513f859279d37d245b9ad3ed0a1c10c265a33bb 100644 (file)
@@ -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 */