]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/legacy/munmap.c
xnu-3789.51.2.tar.gz
[apple/xnu.git] / libsyscall / wrappers / legacy / munmap.c
index 3a69297ebe6d0ec416b5c127ad867d61e28f7ecc..fb9e726a749c1872bf764686c19436c8cab7e55d 100644 (file)
@@ -62,12 +62,12 @@ munmap(void *addr, size_t len)
        addr = (void *) (((uintptr_t) addr) & ~PAGE_MASK);
        len += offset;
 
-       int result = __munmap(addr, len);
-
        if (__syscall_logger) {
                __syscall_logger(stack_logging_type_vm_deallocate, (uintptr_t)mach_task_self(), (uintptr_t)addr, len, 0, 0);
        }
 
+       int result = __munmap(addr, len);
+
        return result;
 }
 #endif /* NO_SYSCALL_LEGACY */