mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 08:13:05 +00:00
memory: avoid redundant Windows view protection
This commit is contained in:
1 parent
038d2257de
commit
c30ac7c904
3 files changed
+49
-1
No files matched your search
@@ -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