From: Howard Chu Date: Mon, 11 Jul 2005 17:12:43 +0000 (+0000) Subject: ITS#3841 skip db_close if db_open was never called X-Git-Tag: OPENLDAP_AC_BP~421 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0f2f4f3196062d20e007fba856d08b059339d3ee;p=openldap ITS#3841 skip db_close if db_open was never called --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index b81d6a3853..d0e04377ac 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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 );