about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/wrappedlibc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 919b781f..c67db340 100644
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -2766,13 +2766,7 @@ EXPORT int my_mprotect(x64emu_t* emu, void *addr, unsigned long len, int prot)
     }
     #endif
     if(!ret && len) {
-        if(prot)
-            updateProtection((uintptr_t)addr, len, prot);
-        else {
-            // avoid allocating detailled protection for a no prot 0
-            freeProtection((uintptr_t)addr, len);
-            setProtection_mmap((uintptr_t)addr, len, prot);
-        }
+        updateProtection((uintptr_t)addr, len, prot);
     }
     return ret;
 }