diff options
author | InHong Han <inhong1.han@samsung.com> | 2018-03-13 16:51:57 +0900 |
---|---|---|
committer | InHong Han <inhong1.han@samsung.com> | 2018-03-13 20:17:18 +0900 |
commit | 6916d5d778af27555cc259b4b07634120a67dcb2 (patch) | |
tree | de6cf0a53df5625cdd4a66c1b0e0cc893d836547 /ism/modules | |
parent | 8737f75bb3ce0a80bff81373c6aebc1da8e69618 (diff) | |
download | isf-6916d5d778af27555cc259b4b07634120a67dcb2.tar.gz isf-6916d5d778af27555cc259b4b07634120a67dcb2.tar.bz2 isf-6916d5d778af27555cc259b4b07634120a67dcb2.zip |
Fix issue detected by static analysis tool
Change-Id: Iee5916db218695afed44c503597b2371e0e1a384
Diffstat (limited to 'ism/modules')
-rw-r--r-- | ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp | 9 | ||||
-rw-r--r-- | ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp index b6e9d001..c4e856dc 100644 --- a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp +++ b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp @@ -1936,12 +1936,12 @@ private: trans.put_data(ret); trans.write_to_socket(client_socket); - if (data != NULL) - delete[] data; - if (ret) m_info_manager->show_ise_panel(client_id, client, context, data, len); + if (data != NULL) + delete[] data; + continue; } else if (cmd == ISM_TRANS_CMD_HIDE_ISE_PANEL) { uint32 client; @@ -2717,6 +2717,9 @@ private: } else { LOGW("wrong format of transaction"); } + + if (data != NULL) + delete [] data; } else if (cmd == ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST) { String uuid; diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index a91fcaf4..c24902a0 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -490,7 +490,7 @@ _wsc_im_ctx_mime_type (void *data, struct wl_input_method_context *im_ctx, const if (!wsc_ctx) return; if (wsc_ctx->impl) { - wsc_ctx->impl->mime_type = strdup (mime_type); + wsc_ctx->impl->mime_type = String (mime_type); } isf_wsc_context_input_panel_mime_type_accept_set (wsc_ctx, mime_type); @@ -1944,7 +1944,7 @@ wsc_send_preedit_style (WSCContextISF* wsc_ctx) } } } else { - if (!wsc_ctx->impl->preedit_attrlist.empty ()) + if (wsc_ctx->impl && !wsc_ctx->impl->preedit_attrlist.empty ()) wsc_ctx->impl->preedit_attrlist.clear (); } } |