Commit 585e9d6c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed 2 fd leaks in comm functions.

Removed erroneous GetLastError() check in WaitCommEvent().
parent 496603cf
......@@ -1567,6 +1567,7 @@ BOOL WINAPI SetCommTimeouts(
if (-1==tcgetattr(fd,&tios)) {
FIXME("tcgetattr on fd %d failed!\n",fd);
close(fd);
return FALSE;
}
......@@ -1591,6 +1592,7 @@ BOOL WINAPI SetCommTimeouts(
if (-1==tcsetattr(fd,0,&tios)) {
FIXME("tcsetattr on fd %d failed!\n",fd);
close(fd);
return FALSE;
}
close(fd);
......@@ -1760,12 +1762,6 @@ BOOL WINAPI WaitCommEvent(
COMM_WaitCommEvent(hFile, lpdwEvents, &ov);
if(GetLastError()!=STATUS_PENDING)
{
CloseHandle(ov.hEvent);
return FALSE;
}
/* wait for the overlapped to complete */
ret = GetOverlappedResult(hFile, &ov, NULL, TRUE);
CloseHandle(ov.hEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment