From d9c3213ef6c319b3444cf86f52f7e2ba507a893c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 7 Oct 2025 21:43:35 -1000 Subject: [PATCH] goodbye strdup --- esphome/components/mdns/mdns_component.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/mdns/mdns_component.h b/esphome/components/mdns/mdns_component.h index a3684f6f5e..241c32079e 100644 --- a/esphome/components/mdns/mdns_component.h +++ b/esphome/components/mdns/mdns_component.h @@ -65,6 +65,9 @@ class MDNSComponent : public Component { return this->dynamic_txt_values_.back().c_str(); } + /// Storage for runtime-generated TXT values (MAC address, user lambdas) + /// Pre-sized at compile time via MDNS_DYNAMIC_TXT_COUNT to avoid heap allocations. + /// Static/compile-time values (version, board, etc.) are stored directly in flash and don't use this. StaticVector dynamic_txt_values_; protected: