Skip to content

Commit

Permalink
chore(libscap/engine/bpf): reset bpf_map_fds to -1
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo authored and LucaGuerra committed Aug 1, 2024
1 parent 0bc1794 commit b8ea9b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions userspace/libscap/engine/bpf/scap_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8ea9b2

Please sign in to comment.