]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, cleanup fakeroot entry before freeing
authorHoward Chu <hyc@openldap.org>
Fri, 9 Feb 2007 17:39:49 +0000 (17:39 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 9 Feb 2007 17:39:49 +0000 (17:39 +0000)
servers/slapd/back-bdb/init.c

index 5d594bd115ad74c296632461371ad2853e2b415d..e4566c67bed7531c30bf5004810536888d390116 100644 (file)
@@ -564,7 +564,15 @@ bdb_db_destroy( BackendDB *be )
        ldap_pvt_thread_rdwr_destroy( &bdb->bi_idl_tree_rwlock );
        ldap_pvt_thread_mutex_destroy( &bdb->bi_idl_tree_lrulock );
 
-       entry_free( bdb->bi_cache.c_dntree.bei_e );
+       {
+               Entry *e;
+               e = bdb->bi_cache.c_dntree.bei_e;
+               bdb->bi_cache.c_dntree.bei_e = NULL;
+               e->e_private = NULL;
+               BER_BVZERO( &e->e_name );
+               BER_BVZERO( &e->e_nname );
+               entry_free( e );
+       }
 
        ch_free( bdb );
        be->be_private = NULL;