.
D 2009-07-12T12:15:44
J assignee kennykb
J cmimetype text/plain
J comment Tcl_ThreadQueueEvent()\sonly\scalls\sQueueEvent()\swhich\sactually\sadds\sthe\sevent\sto\sthe\sspecified\snotifier's\squeue\sif\ssuch\snotifier\swas\sfound,\sthat\sis,\sif\sthere\sis\sa\snotifier\sbound\sto\sthe\sthread\sspecified\sin\sthe\scall.\n\nAs\sthe\sspecification\sstates\sthat\safter\sa\scall\sto\sTcl_ThreadQueueEvent()\sthe\sevent's\smemory\swill\sbe\sowned\sby\sthe\sapproptiate\snotifier,\sand\sthe\sfunction\sdoes\snot\sreturn\sany\sinformation\sto\sthe\scaller\sabout\swhether\sthe\sevent\swas\sdelivered\sor\snot,\sthen\sif\sthe\starget\sthread\sdoes\snot\sexist,\sthe\sevent\smemory\swill\sbe\slost.\n\nSince\sthis\sfunction\sis\sa\spart\sof\sthe\spublic\sAPI\s(and\stherefore\scan\sbe\scalled\swith\sarbitrary\sarguments)\sthe\spossibility\sof\sthe\snon-existing\starget\sthread\sis\spossible.\n\nI\sthink\sthat\sturning\n\nif\s(tsdPtr)\s{\n\s\s\s\sQueueEvent(tsdPtr,\sevPtr,\sposition);\n}\n\ninto\n\nif\s(tsdPtr)\s{\n\s\s\s\sQueueEvent(tsdPtr,\sevPtr,\sposition);\n}\selse\s{\n\s\s\s\sckfree((char*)\sevPtr);\n}\n\nwould\sfulfill\sthe\scontract\sabout\sthe\sevent's\smemory\shandling.
J foundin obsolete:\s8.6b1.1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter flatworm
J subsystem 01.\sNotifier
J title Tcl_ThreadQueueEvent\scan\slead\sto\smemory\sleaks
J type Bug
K 2820349fffffffffffffffffffffffffffffffff
U flatworm
Z 6592d8a2c2685caceda8a342ef49b4a9