summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
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;
}