[Patch attatched]kernel/comm.c: Don't leak file handles

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Thu Nov 3 05:28:50 CST 2005


Changelog:
	dlls/kernel/comm.c: COMM_WaitCommEvent
	Release the file handle when creating thread

Spotted by Cihan Altinay, also fixes then problem with pending characters in
our comm-test when TXD-RXD loopback is enabled.
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/kernel/comm.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/comm.c,v
retrieving revision 1.97
diff -u -w -r1.97 comm.c
--- wine/dlls/kernel/comm.c	27 Sep 2005 09:32:17 -0000	1.97
+++ wine/dlls/kernel/comm.c	3 Nov 2005 09:51:26 -0000
@@ -2102,6 +2102,7 @@
     else
     {
 	CreateThread(NULL, 0, COMM_WaitCommEventService, (LPVOID)commio, 0, NULL);
+	release_comm_fd( commio->handle, fd );
 	SetLastError(ERROR_IO_PENDING);
 	res = FALSE;
     }



More information about the wine-patches mailing list