summaryrefslogtreecommitdiffstats
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 02:04:56 -0800
commit9c8a34c23726c1bbac9e333da1c37b775d4953f9 (patch)
tree94d67f23e6f74b2d37de7efae52f48e0583e403c
parentcd2515ae2c85d915010653d2dcd7e83711ad7533 (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>
-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;
}
}
}