@cryptotaxi247 / netdata-1 / commits / 0878aa7d5

Fix memory leak (#19233)

Release health summary if health should not run

Stelios Fragkakis committed Dec 17, 2024 at 12:05 UTC 0878aa7d5dbe2b20e95a5488a2af056beaf65cd3
1 file changed +3 -1
src/health/health_event_loop.c
+3 -1
@@ -596,8 +596,10 @@ static void health_event_loop_for_host(RRDHOST *host, bool apply_hibernation_del
596 foreach_rrdcalc_in_rrdhost_done(rc);
597 }
598
599 - if(unlikely(!service_running(SERVICE_HEALTH) || !rrdhost_should_run_health(host)))
599 + if(unlikely(!service_running(SERVICE_HEALTH) || !rrdhost_should_run_health(host))) {
600 + alerts_raised_summary_free(hrm);
601 return;
602 + }
603
604 // execute notifications
605 // and cleanup