From: Sangkoo Kim Date: Mon, 8 May 2017 02:07:47 +0000 (+0900) Subject: Fix svace issue X-Git-Tag: submit/tizen/20170508.021330^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2a59b53c861373d73f5c4276ffd18056f78f33c;p=platform%2Fcore%2Fservice%2Fcloud%2Fua-client.git Fix svace issue - 207736, 207738, 207749, 207750, 207751, 212405 Modify device name Change-Id: I09b4ae68e4cb733d7e5f8b40aaebd5e0687d8a16 Signed-off-by: Sangkoo Kim --- diff --git a/src/ua_client.cpp b/src/ua_client.cpp index 09e10c2..b075fed 100755 --- a/src/ua_client.cpp +++ b/src/ua_client.cpp @@ -87,6 +87,7 @@ class Resource OCResourceHandle m_handle; Resource(string uri, vector rt, vector itf) { + m_handle = NULL; m_representation.setUri(uri); m_representation.setResourceTypes(rt); m_representation.setResourceInterfaces(itf); @@ -426,6 +427,7 @@ static void _exec_update() FILE* fp = fopen(UPDATE_FILE, "w"); if(!fp) { UA_LOG("fopen error: %d", errno); + return; } fclose(fp); } @@ -810,7 +812,7 @@ OCStackResult SetDeviceInfo() return result; } - result = OCPlatform::setPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_DEVICE_NAME, "TIZEN_RPI3"); + result = OCPlatform::setPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_DEVICE_NAME, "TIZEN LAMP"); UA_LOG("setPropertyValue() to set device name, result=[%d]", result); if (result != OC_STACK_OK) @@ -920,6 +922,7 @@ bool _connect_ap_cb(wifi_manager_ap_h ap, void *user_data) rv = wifi_manager_ap_get_essid(ap, &ap_name); if (rv != WIFI_MANAGER_ERROR_NONE) { UA_LOG("Fail to get AP name [%s]", __test_convert_error_to_string((wifi_manager_error_e)rv)); + g_free(ap_name); return false; } else { UA_LOG("AP name = [%s]", ap_name); @@ -1348,6 +1351,13 @@ void *_start_ua_client(void *data) // Running.... } + g_free(httr_res_header); + g_free(httr_res_body); + g_free(old_ver); + g_free(new_ver); + g_free(download_url); + g_free(priority); + return NULL; }