From fe76d4fc0b1874f25db4878ae66f4d15970d6d83 Mon Sep 17 00:00:00 2001 From: chinggg <24590067+chinggg@users.noreply.github.com> Date: Sun, 1 May 2022 09:17:09 +0800 Subject: [PATCH] fix(memory): remove misused region bound check of unmap_all --- qiling/os/memory.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qiling/os/memory.py b/qiling/os/memory.py index 843059534..5357623ef 100644 --- a/qiling/os/memory.py +++ b/qiling/os/memory.py @@ -419,8 +419,7 @@ def unmap_all(self): """ for begin, end, _ in self.ql.uc.mem_regions(): - if begin and end: - self.unmap(begin, end - begin + 1) + self.unmap(begin, end - begin + 1) def is_available(self, addr: int, size: int) -> bool: """Query whether the memory range starting at `addr` and is of length of `size` bytes