mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[winpr,synch] check for valid file descriptor
This commit is contained in:
@@ -171,13 +171,13 @@ BOOL winpr_event_reset(WINPR_EVENT_IMPL* event)
|
||||
|
||||
void winpr_event_uninit(WINPR_EVENT_IMPL* event)
|
||||
{
|
||||
if (event->fds[0] != -1)
|
||||
if (event->fds[0] >= 0)
|
||||
{
|
||||
close(event->fds[0]);
|
||||
event->fds[0] = -1;
|
||||
}
|
||||
|
||||
if (event->fds[1] != -1)
|
||||
if (event->fds[1] >= 0)
|
||||
{
|
||||
close(event->fds[1]);
|
||||
event->fds[1] = -1;
|
||||
|
||||
Reference in New Issue
Block a user