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

Defer calling the destructor for the user data on a module until after the

module has disconnected.
[forum:/forumpost/b68391eb71fdff73|Forum post b68391eb71fdff73].

FossilOrigin-Name: 1ab122289fe6ac4cb3b0c47d17ac22627fcdfed80c941a57e6e6cc4d9dbd9273
This commit is contained in:
drh
2023-01-25 19:05:04 +00:00
parent b604f1456e
commit e9b20a9c4b
3 changed files with 8 additions and 8 deletions

View File

@@ -211,10 +211,10 @@ void sqlite3VtabUnlock(VTable *pVTab){
pVTab->nRef--;
if( pVTab->nRef==0 ){
sqlite3_vtab *p = pVTab->pVtab;
sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod);
if( p ){
p->pModule->xDisconnect(p);
}
sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod);
sqlite3DbFree(db, pVTab);
}
}