aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-08-16 22:58:29 +0000
committerdrh <drh@noemail.net>2019-08-16 22:58:29 +0000
commitcc5979dbd384049c1efef847e5cc22082191024b (patch)
tree6d78eae3ee76266e7869e0fffa568c9a828e9763 /src/main.c
parent4043cfef7590c5a8b90cfbee44b45f6ca8bbf176 (diff)
downloadsqlite-cc5979dbd384049c1efef847e5cc22082191024b.tar.gz
sqlite-cc5979dbd384049c1efef847e5cc22082191024b.zip
Add the ability to unregister a virtual table module by invoking
sqlite3_create_module() with a NULL sqlite3_module pointer. FossilOrigin-Name: 31e34fa3390196cdc3178bf120224b08df5ec58fa2c77079ede6e9461a430dad
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index ecc7e5c51..79a17e5a5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1236,11 +1236,8 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
#ifndef SQLITE_OMIT_VIRTUALTABLE
for(i=sqliteHashFirst(&db->aModule); i; i=sqliteHashNext(i)){
Module *pMod = (Module *)sqliteHashData(i);
- if( pMod->xDestroy ){
- pMod->xDestroy(pMod->pAux);
- }
sqlite3VtabEponymousTableClear(db, pMod);
- sqlite3DbFree(db, pMod);
+ sqlite3VtabModuleUnref(db, pMod);
}
sqlite3HashClear(&db->aModule);
#endif