summaryrefslogtreecommitdiffstats
path: root/src/core
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-20 20:28:24 +0200
commit1e59b5455ed31fee3002a4867352ec6c2b11a025 (patch)
tree23f5c0afaba46a030b34cfe1709cecc0fe7d5d25 /src/core
parentunits: deny access to block devices (diff)
downloadsystemd-1e59b5455ed31fee3002a4867352ec6c2b11a025.tar.xz
systemd-1e59b5455ed31fee3002a4867352ec6c2b11a025.zip
bpf: use more TAKE_FD()
Diffstat (limited to 'src/core')
-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;
}