From c8860856bbbdb837ec413fa434368d2b30194823 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Tue, 15 Mar 2022 20:01:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- frameworks/inputmethod_ability/src/input_method_core_stub.cpp | 2 ++ .../inputmethod_controller/src/input_method_controller.cpp | 2 ++ services/src/peruser_session.cpp | 1 + 3 files changed, 5 insertions(+) diff --git a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp index 2fc3af6..b4d9f4a 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp @@ -92,6 +92,7 @@ namespace MiscServices { IMSA_HILOGI("InputMethodCoreStub::OnRemoteRequest START_INPUT inputDataChannel is nulltpr"); } startInput(inputDataChannel, *editorAttribute, supportPhysicalKbd); + delete editorAttribute; reply.WriteNoException(); break; } @@ -120,6 +121,7 @@ namespace MiscServices { case SET_KEYBOARD_TYPE: { KeyboardType *type = data.ReadParcelable(); setKeyboardType(*type); + delete type; reply.WriteNoException(); break; } diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index 8051f46..8a09e04 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -158,6 +158,7 @@ using namespace MessageID; if (textListener != nullptr) { textListener->SendKeyboardInfo(*info); } + delete info; break; } case MSG_ID_SEND_FUNCTION_KEY: { @@ -169,6 +170,7 @@ using namespace MessageID; if (textListener != nullptr) { textListener->SendKeyboardInfo(*info); } + delete info; break; } case MSG_ID_MOVE_CURSOR: { diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index 1b6d18a..5682952 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -1185,6 +1185,7 @@ namespace MiscServices { } int ret = AddClient(pid, uid, displayId, client, channel, *attribute); + delete attribute; if (ret != ErrorCode::NO_ERROR) { IMSA_HILOGE("PerUserSession::OnPrepareInput Aborted! %{public}s", ErrorCode::ToString(ret)); return;