** Free all resources allocated as part of sqlite3_recover_step() calls. */
| 15472 | ** Free all resources allocated as part of sqlite3_recover_step() calls. |
| 15473 | */ |
| 15474 | static void recoverFinalCleanup(sqlite3_recover *p){ |
| 15475 | RecoverTable *pTab = 0; |
| 15476 | RecoverTable *pNext = 0; |
| 15477 | |
| 15478 | recoverWriteDataCleanup(p); |
| 15479 | recoverLostAndFoundCleanup(p); |
| 15480 | |
| 15481 | for(pTab=p->pTblList; pTab; pTab=pNext){ |
| 15482 | pNext = pTab->pNext; |
| 15483 | sqlite3_free(pTab); |
| 15484 | } |
| 15485 | p->pTblList = 0; |
| 15486 | sqlite3_finalize(p->pGetPage); |
| 15487 | p->pGetPage = 0; |
| 15488 | sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0); |
| 15489 | |
| 15490 | { |
| 15491 | #ifndef NDEBUG |
| 15492 | int res = |
| 15493 | #endif |
| 15494 | sqlite3_close(p->dbOut); |
| 15495 | assert( res==SQLITE_OK ); |
| 15496 | } |
| 15497 | p->dbOut = 0; |
| 15498 | } |
| 15499 | |
| 15500 | /* |
| 15501 | ** Decode and return an unsigned 16-bit big-endian integer value from |
no test coverage detected