From 1e59b5455ed31fee3002a4867352ec6c2b11a025 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 20 Jun 2019 14:41:09 +0200 Subject: [PATCH] bpf: use more TAKE_FD() --- src/core/bpf-firewall.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c index 7b9aeb6fbf..33fad30a47 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; }