From: Brendan Cully Date: Tue, 3 Apr 2007 15:59:11 +0000 (-0700) Subject: Fix DB4 crash introduced in d5ab883ef90a X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f3db4ed36d37052f26e370b6f7534fb47bd364d;p=neomutt Fix DB4 crash introduced in d5ab883ef90a --- diff --git a/hcache.c b/hcache.c index facf04eea..05574d983 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) {