From: Lennart Poettering Date: Thu, 20 Jun 2019 12:41:09 +0000 (+0200) Subject: bpf: use more TAKE_FD() X-Git-Tag: v243-rc1~258 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=1e59b5455ed31fee3002a4867352ec6c2b11a025 bpf: use more TAKE_FD() --- diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c index 7b9aeb6fbf4..33fad30a479 100644 --- a/src/core/bpf-firewall.c +++ b/src/core/bpf-firewall.c @@ -430,10 +430,8 @@ static int bpf_firewall_prepare_access_maps( return r; } - *ret_ipv4_map_fd = ipv4_map_fd; - *ret_ipv6_map_fd = ipv6_map_fd; - - ipv4_map_fd = ipv6_map_fd = -1; + *ret_ipv4_map_fd = TAKE_FD(ipv4_map_fd); + *ret_ipv6_map_fd = TAKE_FD(ipv6_map_fd); return 0; }