fix svace issues
[platform/core/messaging/msg-service.git] / utils / MsgUtilFunction.cpp
index 3bf80da..61851c6 100755 (executable)
@@ -1287,6 +1287,11 @@ 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;