]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix handle leak in winhandl.c.
authorSimon Tatham <anakin@pobox.com>
Sat, 7 Feb 2015 11:48:19 +0000 (11:48 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 7 Feb 2015 12:50:03 +0000 (12:50 +0000)
commit7549f2da40d3666f2c9527d84d9ed5468e231691
treea060a670049accd7d9ce526c165aee6f723c17f8
parent8dedf59080d1318ede64c12b99b1a3a2c321d304
Fix handle leak in winhandl.c.

The code for cleaning up handle structures works by the main thread
asking the per-handle subthread to shut down by means of setting its
'done' flag, and then once the subthread signals back through its
event object that it's done so, the main thread frees all its
resources and removes the event object from the list of things being
checked in the program's event loop.

But read threads were not sending back that final event acknowledging
a request to shut down, so their event objects were never being
cleaned up.

Bug spotted by Ronald Weiss.
windows/winhandl.c