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 77d7a292569..2ef49691f46 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1913,13 +1913,16 @@ NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE hModule) WINE_MODREF *wm; NTSTATUS ret = STATUS_SUCCESS;
- lock_loader_exclusive(); + lock_loader_shared();
wm = get_modref( hModule ); + + lock_module_info(); if (!wm || wm->ldr.TlsIndex != -1) ret = STATUS_DLL_NOT_FOUND; else wm->ldr.Flags |= LDR_NO_DLL_CALLS; + unlock_module_info();
unlock_loader();