]> git.sur5r.net Git - openldap/commitdiff
ITS#3841 skip db_close if db_open was never called
authorHoward Chu <hyc@openldap.org>
Mon, 11 Jul 2005 17:12:43 +0000 (17:12 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 11 Jul 2005 17:12:43 +0000 (17:12 +0000)
servers/slapd/back-bdb/init.c

index b81d6a3853aed7840f455e051d2bd19d7a4019d9..d0e04377ac09abe5bd62495735af4b405a5b3c61 100644 (file)
@@ -543,6 +543,10 @@ bdb_db_close( BackendDB *be )
        struct bdb_db_info *db;
        bdb_idl_cache_entry_t *entry, *next_entry;
 
+       /* backend_shutdown closes everything, even if not all were opened */
+       if ( !bdb->bi_flags & BDB_IS_OPEN )
+               return 0;
+
        bdb->bi_flags &= ~BDB_IS_OPEN;
 
        ber_bvarray_free( bdb->bi_db_config );