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);