mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 03:59:34 -05:00
Plug mem leaks
This commit is contained in:
parent
5ab38cfa5f
commit
6b59008f26
1 changed files with 8 additions and 0 deletions
|
|
@ -686,6 +686,7 @@ again: ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
|
|||
bdb_fix_dn( ep, 0 );
|
||||
#endif
|
||||
(*eip)->bei_e = ep;
|
||||
ep = NULL;
|
||||
}
|
||||
}
|
||||
bdb_cache_entry_db_relock( bdb->bi_dbenv, locker,
|
||||
|
|
@ -713,6 +714,9 @@ again: ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
|
|||
if ( islocked ) {
|
||||
bdb_cache_entryinfo_unlock( *eip );
|
||||
}
|
||||
if ( ep ) {
|
||||
bdb_entry_return( ep );
|
||||
}
|
||||
if ( rc == 0 ) {
|
||||
/* set lru mutex */
|
||||
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.lru_mutex );
|
||||
|
|
@ -1077,6 +1081,10 @@ bdb_cache_release_all( Cache *cache )
|
|||
|
||||
avl_free( cache->c_dntree.bei_kids, NULL );
|
||||
avl_free( cache->c_idtree, bdb_entryinfo_release );
|
||||
for (;cache->c_eifree;cache->c_eifree = cache->c_lruhead) {
|
||||
cache->c_lruhead = cache->c_eifree->bei_lrunext;
|
||||
bdb_cache_entryinfo_destroy(cache->c_eifree);
|
||||
}
|
||||
cache->c_lruhead = NULL;
|
||||
cache->c_lrutail = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue