From: Hyunjin Park Date: Thu, 8 Dec 2016 06:17:16 +0000 (+0900) Subject: [nbs] fix svace issue WGID 158431 X-Git-Tag: accepted/tizen/3.0/common/20161209.094832~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F103354%2F2;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [nbs] fix svace issue WGID 158431 - MEMORY_LEAK.STRDUP [verification] test result of web TCT is 100% passed. Change-Id: I1806e9e7da2e9285f9eea2ae5c9d4ad70427ead4 --- diff --git a/src/networkbearerselection/networkbearerselection_manager.cc b/src/networkbearerselection/networkbearerselection_manager.cc index 1c4903b..34b23e1 100644 --- a/src/networkbearerselection/networkbearerselection_manager.cc +++ b/src/networkbearerselection/networkbearerselection_manager.cc @@ -268,6 +268,10 @@ void NetworkBearerSelectionManager::requestRouteToHost( if (connection_profile_get_name(profileHandle, ¤tProfileName_c) != CONNECTION_ERROR_NONE) { LoggerE("Fail to get current profile name"); + if (currentProfileName_c != nullptr) { + free(currentProfileName_c); + currentProfileName_c = nullptr; + } makeErrorCallback(domain_name, kPlatformError); return; }