From 32da87cee119f31c003d9830d9f0aa7525bca0d5 Mon Sep 17 00:00:00 2001 From: "tianfeng.yang" Date: Fri, 26 Jan 2024 18:20:22 +0800 Subject: [PATCH] [Linux] fix memory leak --- src/platform/Linux/DnssdImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index 5f46dd24d8728f..2a1873072fbb9e 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -893,7 +893,7 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte avahi_service_resolver_free(resolver); context->mResolver = avahi_service_resolver_new( context->mInstance->mClient, context->mInterface, context->mTransport, context->mName, context->mFullType.c_str(), - nullptr, context->mAddressType, static_cast(0), HandleResolve, context); + nullptr, context->mAddressType, static_cast(0), HandleResolve, userdata); if (context->mResolver == nullptr) { ChipLogError(DeviceLayer, "Avahi resolve failed on retry");