summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-bluez.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-12-11 00:56:44 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-12-11 01:06:46 -0800
commit92980be060421c42b7b7453ac20ee2b71d3b3ed2 (patch)
tree68218f86c058951a10be7bef64fcb73a9bf79195 /binding/bluetooth-bluez.c
parent4137e7f3b9f0bcb633724878c7f19e55c8273982 (diff)
binding: bluetooth: g_variant_unref() isn't being called on reply
Fix logic check and run g_variant_unref() on reply of dbus call Bug-AGL: SPEC-1630 Change-Id: I7e89031d8cad64c3303227c0ec7fd85a6c85f0c3 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-bluez.c')
-rw-r--r--binding/bluetooth-bluez.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/binding/bluetooth-bluez.c b/binding/bluetooth-bluez.c
index 60be18a..fa6d34b 100644
--- a/binding/bluetooth-bluez.c
+++ b/binding/bluetooth-bluez.c
@@ -623,9 +623,11 @@ gboolean bluetooth_autoconnect(gpointer data)
reply = bluez_call(ns, "device", path, "Connect", NULL, NULL);
g_free(path);
- if (reply)
- return FALSE;
+ if (!reply)
+ continue;
g_variant_unref(reply);
+
+ return FALSE;
}
}
}