From: taesub kim Date: Tue, 21 Feb 2017 06:03:18 +0000 (+0900) Subject: [UTC][connection][Non-ACR][Fix memory leak] X-Git-Tag: 4.0_Bringup~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76e69b73633d0c39257c7eba8a0030799c339b33;p=test%2Ftct%2Fnative%2Fapi.git [UTC][connection][Non-ACR][Fix memory leak] Change-Id: I28fb89797106d8caf9b85eb0c4f24ddba845d081 Signed-off-by: Taesub Kim --- diff --git a/src/utc/connection/utc-connection-profile.c b/src/utc/connection/utc-connection-profile.c index e1613df4d..1b036a9fd 100755 --- a/src/utc/connection/utc-connection-profile.c +++ b/src/utc/connection/utc-connection-profile.c @@ -713,12 +713,14 @@ int utc_connection_profile_get_subnet_mask_p(void) if(all_features_not_supported){ ret = connection_profile_get_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr); + FREE_RESOURCE(ip_addr); assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED); return 0; } assert(profile_temp); ret = connection_profile_get_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr); + FREE_RESOURCE(ip_addr); assert_eq(ret, CONNECTION_ERROR_NONE); return 0; diff --git a/src/utc/connection/utc-network-connection.c b/src/utc/connection/utc-network-connection.c index 045baaa74..1986d463b 100755 --- a/src/utc/connection/utc-network-connection.c +++ b/src/utc/connection/utc-network-connection.c @@ -1703,6 +1703,7 @@ int utc_connection_remove_route_ipv6_p(void) if(telephony_supported == false && wifi_supported == false && ethernet_supported == false) { ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::"); + FREE_RESOURCE(interface_name); assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED); return 0; } @@ -1711,6 +1712,7 @@ int utc_connection_remove_route_ipv6_p(void) connection_profile_get_network_interface_name(profile_temp, &interface_name); ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::"); + FREE_RESOURCE(interface_name); assert_eq(ret, CONNECTION_ERROR_NONE); return 0;