From 54962637464344d3700032f370be1dac2c965059 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Wed, 10 Sep 2025 10:27:01 +0800 Subject: [PATCH] =?UTF-8?q?triggerSystemLiveView=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=83=85=E5=86=B5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwang <965027894@qq.com> --- frameworks/ets/ani/src/manager/ani_local_live_view.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frameworks/ets/ani/src/manager/ani_local_live_view.cpp b/frameworks/ets/ani/src/manager/ani_local_live_view.cpp index a677c8be4..1f607f246 100644 --- a/frameworks/ets/ani/src/manager/ani_local_live_view.cpp +++ b/frameworks/ets/ani/src/manager/ani_local_live_view.cpp @@ -66,6 +66,9 @@ void AniSubscribeSystemLiveView(ani_env *env, ani_object subscriberObj) int returncode = OHOS::Notification::NotificationHelper::SubscribeLocalLiveViewNotification( *localLiveViewSubscriber, false); if (returncode != ERR_OK) { + if (localLiveViewSubscriber != nullptr) { + delete localLiveViewSubscriber; + } int externalCode = NotificationSts::GetExternalCode(returncode); OHOS::NotificationSts::ThrowError(env, externalCode, NotificationSts::FindAnsErrMsg(externalCode)); ANS_LOGE("AniSubscribeSystemLiveView error, errorCode: %{public}d", externalCode); -- Gitee