From 9d4d3738ff6e8759b582a966286aa7f8603e09bd Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 14 Oct 2022 14:27:50 +0200 Subject: [PATCH] fix memory leak --- src/mqtt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 251dafdd4..7571f7def 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -912,6 +912,7 @@ void Mqtt::publish_ha_sensor_config(DeviceValue & dv, const std::string & model, dev_json["mf"] = brand; dev_json["mdl"] = model; dev_json["via_device"] = "ems-esp"; + free(cap_name); } // calculate the min and max