diff --git a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp index bf51a666e6a3bd35c8a8ef1d3cc4f73c35fe788c..8e114cc4f0558c68153b91e7f41c38a18c19418e 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp @@ -76,6 +76,7 @@ namespace MiscServices { IMSA_HILOGI("InputMethodCoreStub::OnRemoteRequest START_INPUT inputDataChannel is nulltpr"); } startInput(inputDataChannel, *editorAttribute, supportPhysicalKbd); + delete editorAttribute; reply.WriteNoException(); break; } @@ -99,6 +100,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 b5a5433072c3624c7ba99dad8f663a79a63e4dc3..5aac6ce82b855203e2e5d5811eee3493e34e7743 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -253,4 +253,4 @@ using namespace MessageID; InputMethodController::GetInstance()->OnRemoteSaDied(object); } } -} \ No newline at end of file +} diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index cdcebe40886b87894c501a2bacb53934db6975ef..ea6a6afc28044f8ce81d1360b9088a43432595bb 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -1217,6 +1217,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;