summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2019-12-03 15:18:42 +0530
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2019-12-08 06:08:46 +0200
commita64d3709497e8476356406f17142413a3baf7b61 (patch)
treee60bacfb1aa02618f7253644f0d94a371d0481fe /client
parent467a4930ad42f403dfd16bfd9693ade245909daf (diff)
downloadbluez-a64d3709497e8476356406f17142413a3baf7b61.tar.gz
client: Fix memory leak
Diffstat (limited to 'client')
-rw-r--r--client/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/main.c b/client/main.c
index 68dabda02..8bd0bac9e 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1792,11 +1792,11 @@ static void remove_device(GDBusProxy *proxy)
{
char *path;
- path = g_strdup(g_dbus_proxy_get_path(proxy));
-
if (!default_ctrl)
return;
+ path = g_strdup(g_dbus_proxy_get_path(proxy));
+
if (g_dbus_proxy_method_call(default_ctrl->proxy, "RemoveDevice",
remove_device_setup,
remove_device_reply,