mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
fix(net) losing the raw file descriptor may leak resources
Signed-off-by: xiaobo tian <peterwillcn@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user