diff --git a/reactos/dll/win32/advapi32/sec/misc.c b/reactos/dll/win32/advapi32/sec/misc.c index bee74716d49..cac8d84d842 100644 --- a/reactos/dll/win32/advapi32/sec/misc.c +++ b/reactos/dll/win32/advapi32/sec/misc.c @@ -69,7 +69,9 @@ CheckNtMartaPresent(VOID) { DWORD ErrorCode; - if (NtMarta == NULL) + if (InterlockedCompareExchangePointer(&NtMarta, + NULL, + NULL) == NULL) { /* we're the first one trying to use ntmarta, initialize it and change the pointer after initialization */