Skip to content

Commit

Permalink
fix(libsinsp): avoid setting a null event pointer when returning SCAP…
Browse files Browse the repository at this point in the history
…_EOF in sinsp::next

Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
  • Loading branch information
mrgian committed Mar 8, 2024
1 parent a5463db commit fadaa42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,9 @@ int32_t sinsp::next(OUT sinsp_evt **puevt)
{
if (m_external_event_processor)
{
m_external_event_processor->process_event(NULL, libsinsp::EVENT_RETURN_EOF);
m_external_event_processor->process_event(evt, libsinsp::EVENT_RETURN_EOF);
}
*puevt = evt;
}
else if(res == SCAP_UNEXPECTED_BLOCK)
{
Expand Down

0 comments on commit fadaa42

Please sign in to comment.