@cryptotaxi247 / netdata-1 / commits / fcb9513b9

proc_net_dev: remove device config section (#16492)

Ilya Mashchenko committed Nov 28, 2023 at 18:27 UTC fcb9513b912c91e1616e2bef81687b5f40e77a3c
2 files changed +5
collectors/proc.plugin/proc_net_dev.c
+4
@@ -366,6 +366,10 @@ static void netdev_free_chart_strings(struct netdev *d) {
366 }
367
368 static void netdev_free(struct netdev *d) {
369 + char buf[FILENAME_MAX + 1];
370 + snprintfz(buf, FILENAME_MAX, "plugin:proc:/proc/net/dev:%s", d->name);
371 + config_section_destroy(buf);
372 +
373 netdev_charts_release(d);
374 netdev_free_chart_strings(d);
375 rrdlabels_destroy(d->chart_labels);
daemon/common.h
+1
@@ -28,6 +28,7 @@
28
29 #define config_generate(buffer, only_changed) appconfig_generate(&netdata_config, buffer, only_changed)
30
31 +#define config_section_destroy(section) appconfig_section_destroy_non_loaded(&netdata_config, section)
32 #define config_section_option_destroy(section, name) appconfig_section_option_destroy_non_loaded(&netdata_config, section, name)
33
34 // ----------------------------------------------------------------------------