diff options
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_oomkill.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf_oomkill.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_oomkill.c b/collectors/ebpf.plugin/ebpf_oomkill.c index 463a329049..373e2c2ba4 100644 --- a/collectors/ebpf.plugin/ebpf_oomkill.c +++ b/collectors/ebpf.plugin/ebpf_oomkill.c @@ -60,7 +60,8 @@ static void oomkill_cleanup(void *ptr) bpf_link__destroy(probe_links[i]); i++; } - bpf_object__close(objects); + if (objects) + bpf_object__close(objects); } } |