@cryptotaxi247 / netdata-1 / commits / b16df9449

Fix worker utilization cleanup (#13633)

Stelios Fragkakis committed Sep 7, 2022 at 00:37 UTC b16df94494fc30a78fa27f512f7f72e0fb479f1e
1 file changed +6 -6
daemon/global_statistics.c
+6 -6
@@ -1863,7 +1863,7 @@ static void worker_utilization_charts(void) {
1863 }
1864
1865 static void worker_utilization_finish(void) {
1866 - int i;
1866 + int i, j;
1867 for(i = 0; all_workers_utilization[i].name ;i++) {
1868 struct worker_utilization *wu = &all_workers_utilization[i];
1869
@@ -1872,12 +1872,12 @@ static void worker_utilization_finish(void) {
1872 wu->name_lowercase = NULL;
1873 }
1874
1875 - for(i = 0; i < WORKER_UTILIZATION_MAX_JOB_TYPES ;i++) {
1876 - string_freez(wu->per_job_type[i].name);
1877 - wu->per_job_type[i].name = NULL;
1875 + for(j = 0; j < WORKER_UTILIZATION_MAX_JOB_TYPES ;j++) {
1876 + string_freez(wu->per_job_type[j].name);
1877 + wu->per_job_type[j].name = NULL;
1878
1879 - string_freez(wu->per_job_type[i].units);
1880 - wu->per_job_type[i].units = NULL;
1879 + string_freez(wu->per_job_type[j].units);
1880 + wu->per_job_type[j].units = NULL;
1881 }
1882
1883 // mark all threads as not enabled