Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/ntdll/loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index a044b9cce27..eaca55acf65 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1897,13 +1897,16 @@ NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE hModule) WINE_MODREF *wm; NTSTATUS ret = STATUS_SUCCESS;
- lock_loader_exclusive(); + lock_loader_shared();
wm = get_modref( hModule ); + + RtlAcquireSRWLockExclusive( &ldr_data_srw_lock ); if (!wm || wm->ldr.TlsIndex != -1) ret = STATUS_DLL_NOT_FOUND; else wm->ldr.Flags |= LDR_NO_DLL_CALLS; + RtlReleaseSRWLockExclusive( &ldr_data_srw_lock );
unlock_loader();