.
D 2026-10-25T02:31:55.239
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment As\sdocumented\sin\sthe\smigration\sguide,\ssince\s9.0,\s`Tcl_ListObjIndex`\smay\sreturn\sephemeral\s`Tcl_Obj`\swhere\sthe\sreturned\sobject\sis\snot\sowned\sby\sthe\s(abstract)\slist\simplementation.\sThe\scaller\sis\ssupposed\sto\stake\sownership\s(call\sIncrRef/DecrRef\sdirectly\sor\sby\sadding\sit\sto\sthe\sinterpreter\sresult,\sanother\slist\setc.)\sor\sfree\sit\swith\s`Tcl_BounceRefCount`\sto\sensure\sunreferenced\sobjects\sare\sfreed.\sLists\screated\swith\s`lseq`\sare\san\sexample.\r\n\r\nSeveral\scalls\sto\s`Tcl_ListObjIndex`\sdo\snot\sdoing\sthis,\sboth\swithin\score\sas\swell\sas\sin\sthe\sincluded\spackages\slike\sITcl\sand\sTDBC\sdrivers,\sresulting\sin\spotential\sfor\smemory\sleaks.\sThis\sis\snot\scurrently\sa\smajor\sissue\sas\slseq\sis\sthe\sonly\ssuch\sabstract\slist\sin\sthe\score\sand\sis\sunlikely\sto\sbe\spassed\sas\san\sargument\sin\sthe\scontext\sof\sthe\score\scalls\swhere\s`Tcl_ListObjIndex`\sis\sinvoked.\r\n\r\nStill,\sit\swould\sbe\sadvisable\sto\sfix\sthis\sfor\sthe\sfuture\swhere\sabstract\slists,\swhether\sin\sthe\score\sor\sin\sextensions,\smight\sbecome\smore\scommon.
J foundin 9.0
J is_private 0
J login apnadkarni
J priority 5\sMedium
J private_contact 9546e9877f1a8899e25a89082561ee694e7fb402
J resolution None
J severity Minor
J status Open
J submitter apnadkarni
J subsystem -\sNew\sBuiltin\sCommands
J title Potential\sfor\smemory\sleaks\susing\sTcl_ListObjIndex
J type Bug
K 9d26c038b9f978196513186f9618cffc65c50656
U apnadkarni
Z 2243606ffc6cca4cf68cb8545e2aa23d