[PATCH 1/1] client: Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 client/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/main.c b/client/main.c
index 68dabda..8bd0bac 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,
-- 
2.7.4




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux