]> git.sur5r.net Git - openldap/commitdiff
Fix prev cache.c commit
authorHoward Chu <hyc@openldap.org>
Tue, 29 Apr 2008 21:44:47 +0000 (21:44 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 29 Apr 2008 21:44:47 +0000 (21:44 +0000)
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/delete.c

index c778d81d289ba15579b50babfeda9af0f1a66374..edf73ab28ca7d69416d446db99df3fa718a28552 100644 (file)
@@ -1292,7 +1292,7 @@ bdb_cache_delete_cleanup(
        Cache *cache,
        EntryInfo *ei )
 {
-       bdb_cache_entryinfo_lock( ei );
+       /* Enter with ei locked */
 
        if ( ei->bei_e ) {
                ei->bei_e->e_private = NULL;
index dfa50bed0a638fdf007d94823ebc39fcef1c7399..5008be4344419927c9ed7b5a20bd75d00eddb3b6 100644 (file)
@@ -572,6 +572,7 @@ return_results:
        if( e != NULL ) {
                if ( rs->sr_err == LDAP_SUCCESS ) {
                        /* Free the EntryInfo and the Entry */
+                       bdb_cache_entryinfo_lock( BEI(e) );
                        bdb_cache_delete_cleanup( &bdb->bi_cache, BEI(e) );
                } else {
                        bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);