1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Release resources prior to bailing out of the btreeCreateTable() routine

following an OOM error.

FossilOrigin-Name: b2a72be9bab77f050bef75477a278a6294d3e854
This commit is contained in:
drh
2013-04-03 21:23:28 +00:00
parent 370c9f498d
commit b0a8ea046a
3 changed files with 8 additions and 9 deletions

View File

@@ -7242,12 +7242,11 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
** case they are holding a reference to an xFetch reference
** corresponding to page pgnoRoot. */
rc = saveAllCursors(pBt, 0, 0);
releasePage(pPageMove);
if( rc!=SQLITE_OK ){
return rc;
}
releasePage(pPageMove);
/* Move the page currently at pgnoRoot to pgnoMove. */
rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0, 0);
if( rc!=SQLITE_OK ){