mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
memory: avoid redundant Windows view protection
This commit is contained in:
@@ -597,7 +597,7 @@ private:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!ApplyProtection(ptr, size, mode)) {
|
||||
if (mode == VirtualMemory::Mode::NoAccess && !ApplyProtection(ptr, size, mode)) {
|
||||
UnmapViewOfFile2(GetCurrentProcess(), ptr, MEM_PRESERVE_PLACEHOLDER);
|
||||
SetFailure(failure_reason, FailureReason::ProtectFailed);
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user