summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_hardirq.c
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2022-06-30 06:38:57 +0000
committerGitHub <noreply@github.com>2022-06-30 06:38:57 +0000
commit3f9d90a155f6b7526d430852012835aeab5d1770 (patch)
treee64a7728b0e2e81928ecaebcc2762346bfe8bf0c /collectors/ebpf.plugin/ebpf_hardirq.c
parentb8c08a6fd1170fc529def3127a744a5294ba5c8d (diff)
Ebpf issues (#13259)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_hardirq.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_hardirq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_hardirq.c b/collectors/ebpf.plugin/ebpf_hardirq.c
index 25b2a0ec65..21383f2aa1 100644
--- a/collectors/ebpf.plugin/ebpf_hardirq.c
+++ b/collectors/ebpf.plugin/ebpf_hardirq.c
@@ -179,7 +179,8 @@ static void hardirq_cleanup(void *ptr)
bpf_link__destroy(probe_links[i]);
i++;
}
- bpf_object__close(objects);
+ if (objects)
+ bpf_object__close(objects);
}
}