Issue: Memory leak in MQTT callback function #32
https://github.com/toblum/McLighting/issues/32 added free()
This commit is contained in:
parent
88b476db51
commit
ab9253abde
1 changed files with 2 additions and 0 deletions
|
@ -384,6 +384,8 @@ void checkForRequests() {
|
||||||
DBG_OUTPUT_PORT.printf("MQTT: Set WS2812 mode [%s]\n", payload);
|
DBG_OUTPUT_PORT.printf("MQTT: Set WS2812 mode [%s]\n", payload);
|
||||||
mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str());
|
mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mqtt_reconnect() {
|
void mqtt_reconnect() {
|
||||||
|
|
Loading…
Reference in a new issue