fix(net) losing the raw file descriptor may leak resources

Signed-off-by: xiaobo tian <peterwillcn@gmail.com>
This commit is contained in:
xiaobo tian
2024-08-07 11:41:10 +08:00
committed by ty
parent 29fc232e1f
commit 9ec9d8e27b

View File

@@ -68,7 +68,7 @@ where
let sock = unsafe { Socket::from_raw_fd(fd) };
let result = socket_bind_dual_stack_inner(&sock, addr, ipv6_only);
sock.into_raw_fd();
let _ = sock.into_raw_fd();
result
}