diff options
author | dan <dan@noemail.net> | 2010-05-13 07:08:53 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-05-13 07:08:53 +0000 |
commit | bd50ddeb42ac99c98c65beca62f29f0e1c0a97e3 (patch) | |
tree | b75c98419891338d46074071a999fec39a4ee5a9 /src | |
parent | 7fd555a634bb9a609b0b3c1b1893216b44ee212a (diff) | |
download | sqlite-bd50ddeb42ac99c98c65beca62f29f0e1c0a97e3.tar.gz sqlite-bd50ddeb42ac99c98c65beca62f29f0e1c0a97e3.zip |
Fix for a segfault that can follow a malloc failure.
FossilOrigin-Name: 3cab9022457ce50f82c5822d8ba6c04a3a85cb6a
Diffstat (limited to 'src')
-rw-r--r-- | src/wal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -702,10 +702,10 @@ int sqlite3WalOpen( pRet->zWalName = zWal = pVfs->szOsFile + (char*)pRet->pWalFd; sqlite3_snprintf(nWal, zWal, "%s-wal", zDbName); rc = sqlite3OsShmOpen(pDbFd); - pRet->isWindexOpen = 1; /* Open file handle on the write-ahead log file. */ if( rc==SQLITE_OK ){ + pRet->isWindexOpen = 1; flags = (SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_MAIN_JOURNAL); rc = sqlite3OsOpen(pVfs, zWal, pRet->pWalFd, flags, &flags); } |