diff options
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c index 39ec70f2b..950d0db62 100644 --- a/src/select.c +++ b/src/select.c @@ -3690,10 +3690,11 @@ static int multiSelectOrderBy( */ sqlite3VdbeResolveLabel(v, labelEnd); - /* Reassembly the compound query so that it will be freed correctly + /* Reassemble the compound query so that it will be freed correctly ** by the calling function */ if( pSplit->pPrior ){ - sqlite3SelectDelete(db, pSplit->pPrior); + sqlite3ParserAddCleanup(pParse, + (void(*)(sqlite3*,void*))sqlite3SelectDelete, pSplit->pPrior); } pSplit->pPrior = pPrior; pPrior->pNext = pSplit; |