diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2022-06-30 06:38:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 06:38:57 +0000 |
commit | 3f9d90a155f6b7526d430852012835aeab5d1770 (patch) | |
tree | e64a7728b0e2e81928ecaebcc2762346bfe8bf0c /collectors/ebpf.plugin/ebpf_dcstat.c | |
parent | b8c08a6fd1170fc529def3127a744a5294ba5c8d (diff) |
Ebpf issues (#13259)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_dcstat.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf_dcstat.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.c b/collectors/ebpf.plugin/ebpf_dcstat.c index 732a4102e5..4344b98875 100644 --- a/collectors/ebpf.plugin/ebpf_dcstat.c +++ b/collectors/ebpf.plugin/ebpf_dcstat.c @@ -252,20 +252,6 @@ void dcstat_update_publish(netdata_publish_dcstat_t *out, uint64_t cache_access, *****************************************************************/ /** - * Clean PID structures - * - * Clean the allocated structures. - */ -void clean_dcstat_pid_structures() { - struct pid_stat *pids = root_of_pids; - while (pids) { - freez(dcstat_pid[pids->pid]); - - pids = pids->next; - } -} - -/** * Clean names * * Clean the optional names allocated during startup. @@ -312,7 +298,8 @@ static void ebpf_dcstat_cleanup(void *ptr) bpf_link__destroy(probe_links[i]); i++; } - bpf_object__close(objects); + if (objects) + bpf_object__close(objects); } #ifdef LIBBPF_MAJOR_VERSION else if (bpf_obj) |