aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vtab.c b/src/vtab.c
index 811d2e164..72775fa3c 100644
--- a/src/vtab.c
+++ b/src/vtab.c
@@ -54,13 +54,13 @@ static int createModule(
pMod->xDestroy = xDestroy;
pDel = (Module *)sqlite3HashInsert(&db->aModule, zCopy, nName, (void*)pMod);
if( pDel && pDel->xDestroy ){
+ sqlite3ResetInternalSchema(db, -1);
pDel->xDestroy(pDel->pAux);
}
sqlite3DbFree(db, pDel);
if( pDel==pMod ){
db->mallocFailed = 1;
}
- sqlite3ResetInternalSchema(db, -1);
}else if( xDestroy ){
xDestroy(pAux);
}