wine/dlls/kernel comm.c
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 3 05:38:48 CST 2005
ChangeSet ID: 21084
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/03 05:38:48
Modified files:
dlls/kernel : comm.c
Log message:
Fixed fd leaks (spotted by Cihan Altinay).
Patch: http://cvs.winehq.org/patch.py?id=21084
Old revision New revision Changes Path
1.97 1.98 +2 -1 wine/dlls/kernel/comm.c
Index: wine/dlls/kernel/comm.c
diff -u -p wine/dlls/kernel/comm.c:1.97 wine/dlls/kernel/comm.c:1.98
--- wine/dlls/kernel/comm.c:1.97 3 Nov 2005 11:38:48 -0000
+++ wine/dlls/kernel/comm.c 3 Nov 2005 11:38:48 -0000
@@ -2095,7 +2095,6 @@ static BOOL COMM_WaitCommEvent(
{
TRACE("Event already met\n");
*lpdwEvents = result_mask;
- release_comm_fd( commio->handle, fd );
HeapFree(GetProcessHeap(), 0, commio );
res = TRUE;
}
@@ -2105,10 +2104,12 @@ static BOOL COMM_WaitCommEvent(
SetLastError(ERROR_IO_PENDING);
res = FALSE;
}
+ release_comm_fd( hFile, fd );
return res;
#if !defined(TIOCINQ) || (!(defined(TIOCSERGETLSR) && defined(TIOCSER_TEMT)) || !defined(TIOCINQ)) || !defined(TIOCMGET) || !defined(TIOCM_CTS) ||!defined(TIOCM_DSR) || !defined(TIOCM_RNG) || !defined(TIOCM_CAR)
error:
FIXME("Returning error because of missing capabilities\n");
+ release_comm_fd( hFile, fd );
HeapFree(GetProcessHeap(), 0, commio );
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
More information about the wine-cvs
mailing list