diff options
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c index d279c4c47..cc97dc6b1 100644 --- a/src/btree.c +++ b/src/btree.c @@ -5287,8 +5287,7 @@ int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){ ** sqlite3PagerUnref() on the new page when it is done. ** ** SQLITE_OK is returned on success. Any other return value indicates -** an error. *ppPage and *pPgno are undefined in the event of an error. -** Do not invoke sqlite3PagerUnref() on *ppPage if an error is returned. +** an error. *ppPage is set to NULL in the event of an error. ** ** If the "nearby" parameter is not 0, then an effort is made to ** locate a page close to the page number "nearby". This can be used in an @@ -5532,6 +5531,7 @@ static int allocateBtreePage( rc = sqlite3PagerWrite((*ppPage)->pDbPage); if( rc!=SQLITE_OK ){ releasePage(*ppPage); + *ppPage = 0; } } searchList = 0; |