From: Seonah Moon Date: Mon, 2 Sep 2024 05:26:36 +0000 (+0900) Subject: Fix svace issues X-Git-Tag: accepted/tizen/unified/20240904.172658^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fcore%2Fapi%2Fasp.git Fix svace issues Change-Id: I01364c318a75f7b0f3a8998b42c8091e85c23e0a --- diff --git a/packaging/capi-network-asp.spec b/packaging/capi-network-asp.spec index 737db33..0ebc59e 100755 --- a/packaging/capi-network-asp.spec +++ b/packaging/capi-network-asp.spec @@ -2,7 +2,7 @@ Name: capi-network-asp Summary: An Application Service Platform(ASP) libraries in Native API -Version: 0.1.22 +Version: 0.1.23 Release: 1 Group: Network & Connectivity/API License: Apache-2.0 diff --git a/src/asp-client.cpp b/src/asp-client.cpp index c8a7c28..1c733ea 100755 --- a/src/asp-client.cpp +++ b/src/asp-client.cpp @@ -948,12 +948,6 @@ int asp_advert_create(char *instance_name, asp_advert_service_h *adv_service) RET_ERR_IF_PARAMETER_IS_NOT_VALID(adv_service, __ASP_LOG_FUNC_END__); AspAdvert *service = new AspAdvert; - - if (!service) { - ASP_LOGE("malloc() failed!!!."); - __ASP_LOG_FUNC_END__; - return ASP_ERROR_OUT_OF_MEMORY; - } ASP_LOGD("service [%p]", service); if (instance_name) { @@ -1953,10 +1947,6 @@ int asp_session_create(char *service_mac, unsigned int adv_id, asp_session_h* se } AspSession *service = new AspSession(service_mac, adv_id); - if (!service) { - __ASP_LOG_FUNC_END__; - return ASP_ERROR_OUT_OF_MEMORY; - } ASP_LOGD("service [%p]", service); addSessionToServiceList(service); @@ -2359,11 +2349,6 @@ int asp_session_get_handle(char *session_mac, unsigned int session_id, __clear_asp_variant(variant); AspSession *service = new AspSession(session_mac, session_id, adv_id); - if (!service) { - ASP_LOGE("malloc() failed!!!."); - g_variant_unref(reply); - return ASP_ERROR_OUT_OF_MEMORY; - } ASP_LOGD("service [%p]", service); *session = service;