MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / recoverFinalCleanup

Function recoverFinalCleanup

modules/dasSQLITE/sqlite/shell.c:15474–15498  ·  view source on GitHub ↗

** Free all resources allocated as part of sqlite3_recover_step() calls. */

Source from the content-addressed store, hash-verified

15472** Free all resources allocated as part of sqlite3_recover_step() calls.
15473*/
15474static 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

Callers 2

recoverStepFunction · 0.85
sqlite3_recover_finishFunction · 0.85

Calls 3

recoverWriteDataCleanupFunction · 0.85
assertFunction · 0.85

Tested by

no test coverage detected