From c42e20c286b1e2ea168ed38e6f81ecd71c49c4ac Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Thu, 30 Aug 2018 09:47:02 +0900 Subject: [PATCH] Fix the memory leak Change-Id: Ib4e2a6871652f9b4b44d033c56f665ad329ffb5e Signed-off-by: DoHyun Pyun --- ipsp-agent/bluetooth-ipsp-agent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipsp-agent/bluetooth-ipsp-agent.c b/ipsp-agent/bluetooth-ipsp-agent.c index f16531c..fd2f0dc 100644 --- a/ipsp-agent/bluetooth-ipsp-agent.c +++ b/ipsp-agent/bluetooth-ipsp-agent.c @@ -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"); -- 2.7.4