From a93c49c8f320ca84df91861f7dc3cc543f77d5da Mon Sep 17 00:00:00 2001 From: urmain Date: Fri, 27 Sep 2024 10:57:12 +0900 Subject: [PATCH] Fix defect detected by static analysis tool Change-Id: I5b90f1bf28d30d16d185deb895c3d508a800123f --- org.tizen.multi-assistant-service.xml | 2 +- src/client_manager.cpp | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/org.tizen.multi-assistant-service.xml b/org.tizen.multi-assistant-service.xml index 164b137..3ec4559 100644 --- a/org.tizen.multi-assistant-service.xml +++ b/org.tizen.multi-assistant-service.xml @@ -1,5 +1,5 @@ - + Won Nam Jang Sooyeon Kim diff --git a/src/client_manager.cpp b/src/client_manager.cpp index 9bd575b..9d88a1e 100644 --- a/src/client_manager.cpp +++ b/src/client_manager.cpp @@ -34,16 +34,11 @@ int CClientManager::create_client(pid_t pid, std::string appid, std::string send return -1;// MA_ERROR_OUT_OF_MEMORY; } - if (data) { - data->pid = pid; - data->appid = appid; - data->sender_info = sender_info; - mClientList = g_slist_append(mClientList, data); - MAS_LOGI("Create client : %s %d", appid.c_str(), pid); - } else { - MAS_LOGE("[ERROR] data is NULL"); - return -1;// MA_ERROR_OUT_OF_MEMORY; - } + data->pid = pid; + data->appid = appid; + data->sender_info = sender_info; + mClientList = g_slist_append(mClientList, data); + MAS_LOGI("Create client : %s %d", appid.c_str(), pid); return 0; } -- 2.34.1