]> git.sur5r.net Git - openldap/commitdiff
Fix unlock in prev commit
authorHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2007 11:41:45 +0000 (11:41 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2007 11:41:45 +0000 (11:41 +0000)
servers/slapd/back-bdb/cache.c

index 778251739d4541d9f7d2340d61a66ffe4c2ac5f0..084a4080af6713d187768a259a3eba177b9f96aa 100644 (file)
@@ -257,6 +257,7 @@ bdb_cache_return_entry_rw( struct bdb_info *bdb, Entry *e,
        EntryInfo *ei;
        int free = 0;
 
+       bdb_cache_entry_db_unlock( bdb, lock );
        ei = e->e_private;
        bdb_cache_entryinfo_lock( ei );
        if ( ei->bei_state & CACHE_ENTRY_NOT_CACHED ) {
@@ -265,7 +266,6 @@ bdb_cache_return_entry_rw( struct bdb_info *bdb, Entry *e,
                free = 1;
        }
        bdb_cache_entryinfo_unlock( ei );
-       bdb_cache_entry_db_unlock( bdb, lock );
        if ( free ) {
                e->e_private = NULL;
                bdb_entry_return( e );