Move the pTriggerPrg and pCleanup elements of the Parse object up into the

section of that object that is persisted across calls to sqlite3NestedParse().
This fixes a memory leak
[forum:/info/24bd1fef7e9323ef|reported in forum post 24bd1fef7e9323ef].

FossilOrigin-Name: 562805cf488a455cdc57adcb110fef9b5416d813d5eaeabacd28bccb76d7f39d
This commit is contained in:
drh 2021-12-31 16:37:46 +00:00
parent 9aff824090
commit b296ab6f6a
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Remove\sunnecessary\sconditionals\saround\sthe\sORDER\sBY\sresolver\scalls\sin\nmultiSelectOrderBy().
D 2021-12-30T17:46:15.485
C Move\sthe\spTriggerPrg\sand\spCleanup\selements\sof\sthe\sParse\sobject\sup\sinto\sthe\nsection\sof\sthat\sobject\sthat\sis\spersisted\sacross\scalls\sto\ssqlite3NestedParse().\nThis\sfixes\sa\smemory\sleak\n[forum:/info/24bd1fef7e9323ef|reported\sin\sforum\spost\s24bd1fef7e9323ef].
D 2021-12-31T16:37:46.839
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -555,7 +555,7 @@ F src/shell.c.in 41b0e1f3a0c2443cb0a8d25e5d40529c911c574b5fe5a91dc54e19f90947a35
F src/sqlite.h.in a5e0d6bd47e67aabf1475986d36bdcc7bfa9e06566790ebf8e3aa7fa551c9f99
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 01eb85e4f2759a5ee79c183f4b2877889d4ffdc49d27ae74529c9579e3c8c0ef
F src/sqliteInt.h 850b013088c4cce47763ce795712135081d47bd21a105bfa62dd431dc66f93b7
F src/sqliteInt.h 443810b432d6af91178b3b2e79fe2f71502cff2372bb9c68be1a18e9ebfb4200
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
@ -1935,8 +1935,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 524c2b87d74c8cad6fb377aed7275788d61beafe61e675480de732519987102c
R f797199d3004b4800cca92d57aa013a0
P f2887e018be71bc406526935c7e99e42f12fc5d1d1c65a89dc2b9bfbca01d43d
R f92b26ddc80815fd1b38eeec1ac33f28
U drh
Z 2ac044172bdb3856fa63346532f0ce74
Z 599b2f8e047fc42e8e3708e7636d643f
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
f2887e018be71bc406526935c7e99e42f12fc5d1d1c65a89dc2b9bfbca01d43d
562805cf488a455cdc57adcb110fef9b5416d813d5eaeabacd28bccb76d7f39d

View File

@ -3559,6 +3559,8 @@ struct Parse {
AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
Parse *pToplevel; /* Parse structure for main program (or NULL) */
Table *pTriggerTab; /* Table triggers are being coded for */
TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
union {
int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
Returning *pReturning; /* The RETURNING clause */
@ -3613,9 +3615,7 @@ struct Parse {
Token sArg; /* Complete text of a module argument */
Table **apVtabLock; /* Pointer to virtual tables needing locking */
#endif
TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
With *pWith; /* Current WITH clause, or NULL */
ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
#ifndef SQLITE_OMIT_ALTERTABLE
RenameToken *pRename; /* Tokens subject to renaming by ALTER TABLE */
#endif