Fix the memory leak 51/187951/1 accepted/tizen/unified/20180830.060937 submit/tizen/20180830.010507
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 30 Aug 2018 00:47:02 +0000 (09:47 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 30 Aug 2018 00:47:02 +0000 (09:47 +0900)
Change-Id: Ib4e2a6871652f9b4b44d033c56f665ad329ffb5e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
ipsp-agent/bluetooth-ipsp-agent.c

index f16531c..fd2f0dc 100644 (file)
@@ -715,7 +715,7 @@ static void __bt_ipsp_dbus_method(GDBusConnection *connection,
                BT_DBG("");
                char *ifname = NULL;
                char *address = NULL;
-               char *ip6;
+               char *ip6 = NULL;
                gchar *network_ipv6_address = NULL;
 
                char *remote_ipv6_address = NULL;
@@ -734,6 +734,8 @@ static void __bt_ipsp_dbus_method(GDBusConnection *connection,
                if (ret != BT_ERROR_NONE)
                        BT_DBG("failed to set ipv6 address");
 
+               g_free(ip6);
+
                ret = __bt_ipsp_create_ipv6_remote_address(address, &remote_ipv6_address);
                if (ret != BT_ERROR_NONE)
                        BT_DBG("failed to create remote device ipv6 address");