From 19ed93580f3f828b77bcc9462d742fdee157d1e0 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Tue, 3 Apr 2007 08:59:11 -0700 Subject: [PATCH] Fix DB4 crash introduced in d5ab883ef90a --- hcache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hcache.c b/hcache.c index facf04ee..05574d98 100644 --- a/hcache.c +++ b/hcache.c @@ -992,6 +992,15 @@ mutt_hcache_open(const char *path, const char *folder) FREE(&h); return NULL; } + ret = db_create (&h->db, h->env, 0); + if (ret) + { + h->env->close (h->env, 0); + mx_unlock_file (h->lockfile, h->fd, 0); + close (h->fd); + FREE (&h); + return NULL; + } if (stat(path, &sb) != 0 && errno == ENOENT) { -- 2.40.0