Browse Source

sys/linux: munmap was not using the correct syscall

flga 1 year ago
parent
commit
4266a7c166
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/sys/linux/sys.odin

+ 1 - 1
core/sys/linux/sys.odin

@@ -161,7 +161,7 @@ mprotect :: proc "contextless" (addr: rawptr, size: uint, prot: Mem_Protection)
 /// Unmap memory
 /// Available since Linux 1.0
 munmap :: proc "contextless" (addr: rawptr, size: uint) -> (Errno) {
-	ret := syscall(SYS_mmap, addr, size)
+	ret := syscall(SYS_munmap, addr, size)
 	return Errno(-ret)
 }