https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65b6af58f9cc4ea2fa9f3…
commit 65b6af58f9cc4ea2fa9f34aed7b2a7b5aaec57e8
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Wed Mar 3 14:09:08 2021 +0100
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Mar 3 14:10:47 2021 +0100
[SDK:RTL] Statically initialize RtlCriticalSectionList
This might be used before RtlpInitDeferedCriticalSection gets called
---
sdk/lib/rtl/critical.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sdk/lib/rtl/critical.c b/sdk/lib/rtl/critical.c
index 0911a8ce76f..8ef2c7e9544 100644
--- a/sdk/lib/rtl/critical.c
+++ b/sdk/lib/rtl/critical.c
@@ -17,7 +17,7 @@
#define MAX_STATIC_CS_DEBUG_OBJECTS 64
static RTL_CRITICAL_SECTION RtlCriticalSectionLock;
-static LIST_ENTRY RtlCriticalSectionList;
+static LIST_ENTRY RtlCriticalSectionList = {&RtlCriticalSectionList,
&RtlCriticalSectionList};
static BOOLEAN RtlpCritSectInitialized = FALSE;
static RTL_CRITICAL_SECTION_DEBUG RtlpStaticDebugInfo[MAX_STATIC_CS_DEBUG_OBJECTS];
static BOOLEAN RtlpDebugInfoFreeList[MAX_STATIC_CS_DEBUG_OBJECTS];
@@ -265,9 +265,6 @@ VOID
NTAPI
RtlpInitDeferedCriticalSection(VOID)
{
- /* Initialize the Process Critical Section List */
- InitializeListHead(&RtlCriticalSectionList);
-
/* Initialize the CS Protecting the List */
RtlInitializeCriticalSection(&RtlCriticalSectionLock);