]> granicus.if.org Git - mutt/commitdiff
Fix DB4 crash introduced in d5ab883ef90a
authorBrendan Cully <brendan@kublai.com>
Tue, 3 Apr 2007 15:59:11 +0000 (08:59 -0700)
committerBrendan Cully <brendan@kublai.com>
Tue, 3 Apr 2007 15:59:11 +0000 (08:59 -0700)
hcache.c

index facf04eea47a7e8e70906f303c4a4d6f9ea2d5d9..05574d9838d94b45cf3bd4be904911ce4fedd3c7 100644 (file)
--- 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)
   {