1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix for a segfault that can follow a malloc failure.

FossilOrigin-Name: 3cab9022457ce50f82c5822d8ba6c04a3a85cb6a
This commit is contained in:
dan
2010-05-13 07:08:53 +00:00
parent 7fd555a634
commit bd50ddeb42
3 changed files with 8 additions and 8 deletions

View File

@@ -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);
}