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 <[email protected]>
  • Loading branch information
therealbobo authored and poiana committed Jul 16, 2024
1 parent 4a95c30 commit 12f50b4
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 12f50b4

Please sign in to comment.