From: Jihoon Kim Date: Sun, 24 Jul 2022 07:54:51 +0000 (+0900) Subject: Fix issue detected by static analysis tool X-Git-Tag: accepted/tizen/unified/20240603.032315~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa5d6b088676bd23b596d5ab7b8ffea280092344;p=platform%2Fcore%2Fuifw%2Flibscl-core.git Fix issue detected by static analysis tool Calling app_get_id without checking return value (as is done elsewhere 7 out of 8 times). Change-Id: I788f407ba70fef89c2c4951d588c0e8a73b1c5c5 Signed-off-by: Jihoon Kim --- diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 63cecd4..a04e18d 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -71,14 +71,17 @@ sclboolean CSCLCoreImpl::prepare() if (!m_uuid) { char *appid = NULL; - app_get_id(&appid); - - LOGD("appid : '%s'\n", appid); - - if (appid) { - m_uuid = strdup(appid); - free(appid); + int app_ret = app_get_id(&appid); + if (app_ret == APP_ERROR_NONE) { + LOGD("appid : '%s'\n", appid); + + if (appid) { + m_uuid = strdup(appid); + free(appid); + } } + else + LOGW("Failed to get app id(%d)", app_ret); } if (!m_window_creation_defer_flag) { @@ -482,4 +485,4 @@ void CSCLCoreImpl::send_key_event_processing_result(scim::KeyEvent &key, sclu32 void CSCLCoreImpl::set_dotnet_flag(sclboolean flag) { m_core_ui.set_dotnet_flag(flag); -} \ No newline at end of file +}