Index: runtime/vm/virtual_memory_linux.cc |
diff --git a/runtime/vm/virtual_memory_linux.cc b/runtime/vm/virtual_memory_linux.cc |
index 3c4abec3d29657c8941307df7e909d13b365ff41..cc571396fdb7ec4255c26e36b194d2c01f1a56db 100644 |
--- a/runtime/vm/virtual_memory_linux.cc |
+++ b/runtime/vm/virtual_memory_linux.cc |
@@ -53,7 +53,7 @@ static void unmap(void* address, intptr_t size) { |
VirtualMemory::~VirtualMemory() { |
- if (!embedder_allocated()) { |
+ if (vm_owns_region()) { |
unmap(address(), reserved_size_); |
} |
} |