[UTC][connection][Non-ACR][Fix memory leak]
authortaesub kim <taesub.kim@samsung.com>
Tue, 21 Feb 2017 06:03:18 +0000 (15:03 +0900)
committertaesub kim <taesub.kim@samsung.com>
Tue, 21 Feb 2017 06:03:26 +0000 (15:03 +0900)
Change-Id: I28fb89797106d8caf9b85eb0c4f24ddba845d081
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
src/utc/connection/utc-connection-profile.c
src/utc/connection/utc-network-connection.c

index e1613df4d406830e5ded5b13e35dcc3fd20df620..1b036a9fdd5bdabd61973dbc15cd958b483be9b5 100755 (executable)
@@ -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;
index 045baaa7429a173fbbec3d6e1208dc12190c25ab..1986d463b86342d892872709e7e8277e58aee6c7 100755 (executable)
@@ -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;