mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Avoid an assertion fault and/or freeing memory while it is still in use when
an error occurs during virtual table construction. FossilOrigin-Name: a02599ad85d02470c9effa51c02dbda7796bfa16
This commit is contained in:
@@ -263,9 +263,8 @@ void sqlite3VtabClear(sqlite3 *db, Table *p){
|
||||
if( !db || db->pnBytesFreed==0 ) vtabDisconnectAll(0, p);
|
||||
if( p->azModuleArg ){
|
||||
int i;
|
||||
assert( p->nModuleArg<2 || p->azModuleArg[1]==0 );
|
||||
for(i=0; i<p->nModuleArg; i++){
|
||||
sqlite3DbFree(db, p->azModuleArg[i]);
|
||||
if( i!=1 ) sqlite3DbFree(db, p->azModuleArg[i]);
|
||||
}
|
||||
sqlite3DbFree(db, p->azModuleArg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user