summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_hardirq.c
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2022-12-12 12:39:05 +0000
committerGitHub <noreply@github.com>2022-12-12 12:39:05 +0000
commitd127c108eb9050693c8c7c92d72d4b3177b84959 (patch)
treeedeb85fae0d70fd552ae18bbbae5b7bb97f30447 /collectors/ebpf.plugin/ebpf_hardirq.c
parent05e903688c3b4e5b513338a68689f2d1163e26c3 (diff)
Fix eBPF load on RH 8.x family and improve code. (#14090)
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 b07dd24cae..6408cba1f7 100644
--- a/collectors/ebpf.plugin/ebpf_hardirq.c
+++ b/collectors/ebpf.plugin/ebpf_hardirq.c
@@ -183,7 +183,8 @@ static void ebpf_hardirq_free(ebpf_module_t *em)
static void hardirq_exit(void *ptr)
{
ebpf_module_t *em = (ebpf_module_t *)ptr;
- netdata_thread_cancel(*hardirq_threads.thread);
+ if (hardirq_threads.thread)
+ netdata_thread_cancel(*hardirq_threads.thread);
ebpf_hardirq_free(em);
}