From 4f9669f403093bff10849bda1c7f0db1318b9830 Mon Sep 17 00:00:00 2001 From: liukaii Date: Fri, 4 Jul 2025 17:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liukaii --- frameworks/src/core/base/dft_impl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frameworks/src/core/base/dft_impl.cpp b/frameworks/src/core/base/dft_impl.cpp index 0a96428d..28b2774e 100644 --- a/frameworks/src/core/base/dft_impl.cpp +++ b/frameworks/src/core/base/dft_impl.cpp @@ -87,6 +87,11 @@ void DftImpl::CallbackPageReplaced(int state, const char *param) value.routerPath = DftImpl::GetPagePath(); pageInfoFunc_(value); ACE_FREE(paramValue); + if (value.routerPath != nullptr) { + char *nonConstRouterPath = const_cast(value.routerPath); + ACE_FREE(nonConstRouterPath); + value.routerPath = nullptr; + } } } // namespace ACELite } // namespace OHOS -- Gitee