mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Allocates VDBE cursors one by one in separate memory so that pointers to
cursors can persist through a realloc(). (CVS 1383) FossilOrigin-Name: d8bacc16801606176fe8639b2f55b4584ad549df
This commit is contained in:
@@ -736,7 +736,7 @@ void sqlite3VdbeCleanupCursor(Cursor *pCx){
|
||||
}
|
||||
sqliteFree(pCx->pData);
|
||||
sqliteFree(pCx->aType);
|
||||
memset(pCx, 0, sizeof(Cursor));
|
||||
memset(pCx, 0, sizeof(*pCx));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -745,10 +745,12 @@ void sqlite3VdbeCleanupCursor(Cursor *pCx){
|
||||
static void closeAllCursors(Vdbe *p){
|
||||
int i;
|
||||
for(i=0; i<p->nCursor; i++){
|
||||
sqlite3VdbeCleanupCursor(&p->aCsr[i]);
|
||||
Cursor *pC = p->apCsr[i];
|
||||
sqlite3VdbeCleanupCursor(pC);
|
||||
sqliteFree(pC);
|
||||
}
|
||||
sqliteFree(p->aCsr);
|
||||
p->aCsr = 0;
|
||||
sqliteFree(p->apCsr);
|
||||
p->apCsr = 0;
|
||||
p->nCursor = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user