Skip to content

Commit

Permalink
update: add a defensive check
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
  • Loading branch information
Andreagit97 committed May 10, 2023
1 parent 6dbd46f commit 0ea59e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions userspace/libscap/scap.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,11 @@ scap_threadinfo* scap_get_proc_table(scap_t* handle)
//
int32_t scap_get_stats(scap_t* handle, OUT scap_stats* stats)
{
if(stats == NULL)
{
return SCAP_FAILURE;
}

stats->n_evts = 0;
stats->n_drops = 0;
stats->n_drops_buffer = 0;
Expand Down

0 comments on commit 0ea59e4

Please sign in to comment.