Skip to content

Commit

Permalink
mmap: fd should be -1 when creating anonymous mappings (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenski123 authored Sep 3, 2023
1 parent 1bd6034 commit 02e68a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memory_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub unsafe fn allocate_pages(size_in_bytes: usize) -> Result<*mut u8, EbpfError>
size_in_bytes,
libc::PROT_READ | libc::PROT_WRITE,
libc::MAP_ANONYMOUS | libc::MAP_PRIVATE,
0,
-1,
0,
);
#[cfg(target_os = "windows")]
Expand Down

0 comments on commit 02e68a6

Please sign in to comment.