diff --git a/esphome/components/socket/lwip_getaddrinfo_impl.cpp b/esphome/components/socket/lwip_getaddrinfo_impl.cpp index 9bda4b944d..02b75e81a2 100644 --- a/esphome/components/socket/lwip_getaddrinfo_impl.cpp +++ b/esphome/components/socket/lwip_getaddrinfo_impl.cpp @@ -174,7 +174,7 @@ std::unique_ptr getaddrinfo_async(const char *node, const cha void freeaddrinfo(struct addrinfo *ai) { while (ai != nullptr) { struct addrinfo *next = ai->ai_next; - delete ai; + delete ai; // NOLINT(cppcoreguidelines-owning-memory) ai = next; } }