From: Jeesun Kim Date: Fri, 10 Nov 2017 02:09:43 +0000 (+0900) Subject: [WGID:199951,199961] Fix svace X-Git-Tag: submit/tizen_3.0/20171110.023258^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F159585%2F1;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git [WGID:199951,199961] Fix svace Change-Id: I521208eaa61693f743f1194c1b8897823c4ccdeb --- diff --git a/utils/MsgUtilFunction.cpp b/utils/MsgUtilFunction.cpp index 392e088..b7f0bf2 100755 --- a/utils/MsgUtilFunction.cpp +++ b/utils/MsgUtilFunction.cpp @@ -1286,14 +1286,6 @@ void* _msg_launch_app(void *data) msg_error_t msg_launch_app(const char *app_id, bundle *bundle_data) { - msg_launch_app_data *data = (msg_launch_app_data *)calloc(1, sizeof(msg_launch_app_data)); - if (data == NULL) { - MSG_ERR("Memory alloc failed!"); - return MSG_ERR_MEMORY_ERROR; - } - - data->app_id = g_strdup(app_id); - data->bundle_data = bundle_dup(bundle_data); pthread_t thd; pthread_attr_t attr; @@ -1307,6 +1299,15 @@ msg_error_t msg_launch_app(const char *app_id, bundle *bundle_data) return MSG_ERR_UNKNOWN; } + msg_launch_app_data *data = (msg_launch_app_data *)calloc(1, sizeof(msg_launch_app_data)); + if (data == NULL) { + MSG_ERR("Memory alloc failed!"); + return MSG_ERR_MEMORY_ERROR; + } + + data->app_id = g_strdup(app_id); + data->bundle_data = bundle_dup(bundle_data); + if (pthread_create(&thd, &attr, &_msg_launch_app, data) < 0) { MSG_ERR("pthread_create() error"); }