From af15c8033edab491c85145b9b9f522ab40b693e2 Mon Sep 17 00:00:00 2001 From: Philip Gregor Date: Thu, 4 Apr 2024 10:14:22 -0700 Subject: [PATCH] Android: Fix memory leak in ChipDnssdStopBrowse - Addressed comment by bzbarsky-apple --- src/platform/android/DnssdImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/android/DnssdImpl.cpp b/src/platform/android/DnssdImpl.cpp index 5a27b76c7ebae1..25e07aa2832d1a 100644 --- a/src/platform/android/DnssdImpl.cpp +++ b/src/platform/android/DnssdImpl.cpp @@ -224,6 +224,7 @@ CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier) ChipLogError(Discovery, "Java exception in ChipDnssdStopBrowse"); env->ExceptionDescribe(); env->ExceptionClear(); + chip::Platform::Delete(ctx); return CHIP_JNI_ERROR_EXCEPTION_THROWN; } chip::Platform::Delete(ctx);