[LDR] Release the loader lock the same way it was acquired
authorMark Jansen <mark.jansen@reactos.org>
Sun, 22 Jul 2018 15:17:36 +0000 (17:17 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 22 Jul 2018 15:17:36 +0000 (17:17 +0200)
dll/ntdll/ldr/ldrutils.c

index 2542a9a..5459d4a 100644 (file)
@@ -2626,7 +2626,7 @@ LdrpLoadDll(IN BOOLEAN Redirected,
 
 Quickie:
     /* Release the lock */
-    if (!InInit) RtlLeaveCriticalSection(Peb->LoaderLock);
+    if (!InInit) RtlLeaveCriticalSection(&LdrpLoaderLock);
 
     /* Check for success */
     if (NT_SUCCESS(Status))