Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: I1ab58242e0e0b5201a9246279986cbc700dc4a1e
}
//LCOV_EXCL_START
-static const char* __profile_get_ethernet_proxy(void)
+static char* __profile_get_ethernet_proxy(void)
{
char *proxy;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- const char *proxy;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
if (net_info == NULL)
//LCOV_EXCL_START
if (profile_info->profile_type == NET_DEVICE_ETHERNET) {
- proxy = __profile_get_ethernet_proxy();
- if (proxy == NULL)
+ char *proxy = __profile_get_ethernet_proxy();
+ if (proxy == NULL) {
*type = CONNECTION_PROXY_TYPE_DIRECT;
- else
+ } else {
*type = CONNECTION_PROXY_TYPE_MANUAL;
+ free(proxy);
+ }
return CONNECTION_ERROR_NONE;
}