[RTL] Fix failure check in RtlpCreateCriticalSectionSem.
authorThomas Faber <thomas.faber@reactos.org>
Tue, 25 Jun 2019 06:58:11 +0000 (08:58 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Tue, 25 Jun 2019 07:26:05 +0000 (09:26 +0200)
sdk/lib/rtl/critical.c

index ff0d1a9..1f247f5 100644 (file)
@@ -80,7 +80,7 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection)
                                                NULL) != NULL)
         {
             /* Someone else just created an event */
-            if (hEvent != INVALID_HANDLE_VALUE)
+            if (hNewEvent != INVALID_HANDLE_VALUE)
             {
                 DPRINT("Closing already created event: %p\n", hNewEvent);
                 NtClose(hNewEvent);