Fix memory leak 05/265805/1
authorINSUN PYO <insun.pyo@samsung.com>
Fri, 29 Oct 2021 04:01:35 +0000 (13:01 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Fri, 29 Oct 2021 04:01:50 +0000 (13:01 +0900)
Change-Id: Ia5f751be96c4b9820986b06afb26057cea8b0377

src/utils/emulator.c

index 29f1ab9..49a2b90 100755 (executable)
@@ -94,6 +94,7 @@ static void __netconfig_emulator_set_ip(void)
                                                  g_variant_new_string(ip));
 
        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", params);
@@ -117,6 +118,7 @@ static void __netconfig_emulator_set_proxy(void)
                                                          g_variant_new_string(proxy));
 
                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",
@@ -141,6 +143,7 @@ static void __netconfig_emulator_set_network_state(void)
                                          g_variant_new_int32(VCONFKEY_NETWORK_ETHERNET));
 
        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", params);