From 12f50b4d9985622f0c95d45ade15c798dc1f4de8 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Mon, 15 Jul 2024 13:32:57 +0000 Subject: [PATCH] chore(libscap/engine/bpf): reset bpf_map_fds to -1 Signed-off-by: Roberto Scolaro --- userspace/libscap/engine/bpf/scap_bpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/libscap/engine/bpf/scap_bpf.c b/userspace/libscap/engine/bpf/scap_bpf.c index 6e883f021e..0d4385751c 100644 --- a/userspace/libscap/engine/bpf/scap_bpf.c +++ b/userspace/libscap/engine/bpf/scap_bpf.c @@ -1387,6 +1387,7 @@ int32_t scap_bpf_close(struct scap_engine_handle engine) for(int i = 0; i < BPF_MAPS_MAX; i++) { close(handle->m_bpf_map_fds[i]); + handle->m_bpf_map_fds[i] = -1; } return SCAP_SUCCESS;