summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_dcstat.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_dcstat.c
parentb8c08a6fd1170fc529def3127a744a5294ba5c8d (diff)
Ebpf issues (#13259)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_dcstat.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.c17
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)