Browse Source

Merge pull request #2933 from flga/master

sys/linux: munmap was not using the correct syscall
Jeroen van Rijn 1 year ago
parent
commit
9834ceed42
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)
 }