From fe2da25cd952317d15d50429eb6e8f169377ab81 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 4 Jun 2009 20:45:01 +0200 Subject: [PATCH] Bug #584797 - Do not set internal SQLite3 structures on error --- camel/camel-db.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/camel/camel-db.c b/camel/camel-db.c index 37ff79f..34007e6 100644 --- a/camel/camel-db.c +++ b/camel/camel-db.c @@ -282,6 +282,9 @@ camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const gchar *zPath, sqlite3_file *pF res = old_vfs->xOpen (old_vfs, zPath, cFile->old_vfs_file, flags, pOutFlags); + if (res != SQLITE_OK) + return res; + g_static_rec_mutex_lock (&only_once_lock); /* cFile->old_vfs_file->pMethods is NULL when open failed for some reason, -- 2.7.4