ITS#6577 potential fix, found using valgrind/drd. please test.

This commit is contained in:
Howard Chu 2010-06-20 21:28:04 +00:00
parent 00fc5e0a40
commit bdf52f4fc4

View File

@ -482,17 +482,19 @@ bdb_cache_find_ndn(
*res = eip;
return rc;
}
} else if ( ei2->bei_state & CACHE_ENTRY_DELETED ) {
}
bdb_cache_entryinfo_lock( ei2 );
if ( ei2->bei_state & CACHE_ENTRY_DELETED ) {
/* In the midst of deleting? Give it a chance to
* complete.
*/
bdb_cache_entryinfo_unlock( ei2 );
bdb_cache_entryinfo_unlock( eip );
ldap_pvt_thread_yield();
bdb_cache_entryinfo_lock( eip );
*res = eip;
return DB_NOTFOUND;
}
bdb_cache_entryinfo_lock( ei2 );
bdb_cache_entryinfo_unlock( eip );
eip = ei2;