summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-06-20 14:41:09 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-21 03:28:24 +0900
commit1e59b5455ed31fee3002a4867352ec6c2b11a025 (patch)
tree23f5c0afaba46a030b34cfe1709cecc0fe7d5d25
parent9af2820694e1b2d409ed35cf0bca00acab0bdec5 (diff)
downloadsystemd-1e59b5455ed31fee3002a4867352ec6c2b11a025.tar.gz
bpf: use more TAKE_FD()
-rw-r--r--src/core/bpf-firewall.c6
1 files 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;
}