Skip to content

Commit

Permalink
safety doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Oct 15, 2024
1 parent 90fcd53 commit 157981c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mirrord/layer/src/socket/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,7 @@ pub(super) fn getifaddrs() -> HookResult<*mut libc::ifaddrs> {
// I don't see any reason why we could not do this,
// I also did not find anything suspicious in glibc [implementation](https://github.com/lattera/glibc/blob/master/sysdeps/gnu/ifaddrs.c).
if !ipv6_head.is_null() {
// Safety: we constructed a valid `libc::ifaddrs` list using pointers received from libc.
unsafe { libc::freeifaddrs(ipv6_head) };
}

Expand Down

0 comments on commit 157981c

Please sign in to comment.