diff --git a/winpr/libwinpr/synch/event.c b/winpr/libwinpr/synch/event.c index 543a1092c..173afafb7 100644 --- a/winpr/libwinpr/synch/event.c +++ b/winpr/libwinpr/synch/event.c @@ -125,8 +125,6 @@ BOOL SetEvent(HANDLE hEvent) status = FALSE; - EnterCriticalSection(&cs); - if (winpr_Handle_GetInfo(hEvent, &Type, &Object)) { event = (WINPR_EVENT*) Object; @@ -156,8 +154,6 @@ BOOL SetEvent(HANDLE hEvent) #endif } - LeaveCriticalSection(&cs); - return status; } @@ -171,8 +167,6 @@ BOOL ResetEvent(HANDLE hEvent) status = FALSE; - EnterCriticalSection(&cs); - if (winpr_Handle_GetInfo(hEvent, &Type, &Object)) { event = (WINPR_EVENT*) Object; @@ -199,8 +193,6 @@ BOOL ResetEvent(HANDLE hEvent) } } - LeaveCriticalSection(&cs); - return status; }