Fixed memory leaks
[platform/core/connectivity/net-config.git] / src / network-state.c
index 1c08078..bd6c95a 100755 (executable)
@@ -744,6 +744,7 @@ static void __netconfig_update_default_connection_info(void)
                }
 
                params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
+               g_variant_builder_unref(builder);
 
                netconfig_dbus_emit_signal(NULL, NETCONFIG_NETWORK_PATH,
                                                   NETCONFIG_NETWORK_INTERFACE, "NetworkConfigChanged",
@@ -787,6 +788,8 @@ static void __netconfig_update_default_connection_info(void)
                                                   params);
                netconfig_set_vconf_int("memory/private/wifi/frequency", 0);
 
+               g_variant_builder_unref(builder);
+
                DBG("Successfully clear IP and PROXY up");
 
        } else if (profile != NULL) {
@@ -897,6 +900,8 @@ static void __netconfig_update_default_connection_info(void)
                                                   NETCONFIG_NETWORK_INTERFACE, "NetworkConfigChanged",
                                                   params);
 
+               g_variant_builder_unref(builder);
+
                DBG("Successfully update default network configuration");
        }