]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#1239:
authorRandy Kunkee <kunkee@openldap.org>
Mon, 16 Jul 2001 22:16:24 +0000 (22:16 +0000)
committerRandy Kunkee <kunkee@openldap.org>
Mon, 16 Jul 2001 22:16:24 +0000 (22:16 +0000)
slapadd core-dumps when destroying db's env (Sleepycat 3.2.9) (ITS#1239)
Only call ldbm_shutdown_env if the database has been opened, ie. when
li->li_dbenv != NULL.  Would appear any time a shutdown occurred and
not all LDBM databases were opened.

servers/slapd/back-ldbm/init.c

index 8054d1a6d28b151f3644619fe7a97c4e6b84223a..f369e31bd4e9e1797e03e91784847b560d791189 100644 (file)
@@ -218,7 +218,8 @@ ldbm_back_db_destroy(
        /* should free/destroy every in be_private */
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
 
-       ldbm_shutdown_env(li->li_dbenv);
+       if (li->li_dbenv)
+           ldbm_shutdown_env(li->li_dbenv);
 
        free( li->li_directory );
        attr_index_destroy( li->li_attrs );