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 <jaycecao520@gmail.com>
  • Loading branch information
NitroCao authored and poiana committed Oct 26, 2023
1 parent d8d6d2b commit 17a2c2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions userspace/libscap/engine/bpf/scap_bpf.c
Expand Up @@ -128,6 +128,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 17a2c2f

Please sign in to comment.