Fixed 2 fd leaks in comm functions.

Removed erroneous GetLastError() check in WaitCommEvent().
This commit is contained in:
Marcus Meissner 2003-03-12 20:15:38 +00:00 committed by Alexandre Julliard
parent 496603cf86
commit 585e9d6c24
1 changed files with 2 additions and 6 deletions

View File

@ -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);