diff --git a/interfaces/kits/js/napi/js_input_method_engine.cpp b/interfaces/kits/js/napi/js_input_method_engine.cpp index aad47e6..a1e8121 100644 --- a/interfaces/kits/js/napi/js_input_method_engine.cpp +++ b/interfaces/kits/js/napi/js_input_method_engine.cpp @@ -276,7 +276,6 @@ namespace MiscServices { eventTarget->Off(type); } - delete type; type = nullptr; napi_value result = nullptr; napi_get_undefined(env, &result); diff --git a/services/src/peruser_setting.cpp b/services/src/peruser_setting.cpp index 0d999c8..bb897dd 100644 --- a/services/src/peruser_setting.cpp +++ b/services/src/peruser_setting.cpp @@ -161,7 +161,7 @@ namespace MiscServices { std::u16string key = InputMethodSetting::ENABLED_INPUT_METHODS_TAG; imSetting.SetValue(key, inputMethodSetting.GetValue(key)); - int flag = imSetting.RemoveEnabledInputMethod(imeId); + bool flag = imSetting.RemoveEnabledInputMethod(imeId); if (flag == false) { IMSA_HILOGI("The package removed is not an enabled IME. [%d]\n", userId_); return ErrorCode::NO_ERROR;