aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pager.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pager.c b/src/pager.c
index 9935e2355..2137f0a9c 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -6567,9 +6567,8 @@ int sqlite3PagerOpenWal(
if( !pPager->tempFile && !pPager->pWal ){
if( !sqlite3PagerWalSupported(pPager) ) return SQLITE_CANTOPEN;
- if( isOpen(pPager->jfd) ){
- sqlite3OsClose(pPager->jfd);
- }
+ /* Close any rollback journal previously open */
+ sqlite3OsClose(pPager->jfd);
/* Open the connection to the log file. If this operation fails,
** (e.g. due to malloc() failure), unlock the database file and