}
}
+ if( bdb->bi_dbenv_home ) ch_free( bdb->bi_dbenv_home );
+
#ifdef BDB_HIER
ldap_pvt_thread_rdwr_destroy( &bdb->bi_tree_rdwr );
#endif
ldap_pvt_thread_mutex_destroy( &bdb->bi_lastid_mutex );
ldap_pvt_thread_mutex_destroy( &bdb->bi_database_mutex );
+ ch_free( bdb );
+ be->be_private = NULL;
+
return 0;
}
#endif
/* Allocate IDL stack, plus 1 more for former tmp */
- stack = malloc( (depth + 1) * BDB_IDL_UM_SIZE * sizeof( ID ) );
+ stack = ch_malloc( (depth + 1) * BDB_IDL_UM_SIZE * sizeof( ID ) );
rc = bdb_filter_candidates( be, &f, ids, stack, stack+BDB_IDL_UM_SIZE );
- free( stack );
+ ch_free( stack );
if( rc ) {
#ifdef NEW_LOGGING