1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

For the vtshim module, always zero out the xChildDestroy function pointer after calling it.

FossilOrigin-Name: 240f7252c66ad3ff5ae0ef06455c1ff9bd78bbb4
This commit is contained in:
mistachkin
2013-08-05 21:54:17 +00:00
parent 323df7907e
commit f3d2aaeca2
3 changed files with 13 additions and 9 deletions

View File

@ -429,6 +429,7 @@ static void vtshimAuxDestructor(void *pXAux){
assert( pAux->pAllVtab==0 );
if( !pAux->bDisposed && pAux->xChildDestroy ){
pAux->xChildDestroy(pAux->pChildAux);
pAux->xChildDestroy = 0;
}
sqlite3_free(pAux->zName);
sqlite3_free(pAux->pMod);
@ -527,7 +528,10 @@ void sqlite3_dispose_module(void *pX){
pAux->pMod->xDisconnect(pVtab->pChild);
}
pAux->bDisposed = 1;
if( pAux->xChildDestroy ) pAux->xChildDestroy(pAux->pChildAux);
if( pAux->xChildDestroy ){
pAux->xChildDestroy(pAux->pChildAux);
pAux->xChildDestroy = 0;
}
}
}