Skip to content

Commit

Permalink
fix(userspace/libscap): initialize bpf_engine.m_attached_progs.efd to -1
Browse files Browse the repository at this point in the history
Signed-off-by: Nitro Cao <[email protected]>
  • Loading branch information
NitroCao authored and poiana committed Oct 26, 2023
1 parent a5730f7 commit 2d118d7
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 @@ -129,6 +129,7 @@ static struct bpf_engine* alloc_handle(scap_t* main_handle, char* lasterr_ptr)
for(int j=0; j < BPF_PROG_ATTACHED_MAX; j++)
{
engine->m_attached_progs[j].fd = -1;
engine->m_attached_progs[j].efd = -1;
}
}
return engine;
Expand Down

0 comments on commit 2d118d7

Please sign in to comment.