summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-api.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-05-05 19:48:15 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-05-05 19:49:41 -0700
commitef871e6e5151b47387348ab8d9e21aeeed072b86 (patch)
tree037d65d5378e53d692142e447763738a6c2c307c /binding/bluetooth-api.c
parent5068f85cacab59bf740dea059c6cc46ea66b4993 (diff)
binding: bluetooth: add missing g_variant_unref() on replies
To avoid memory leaks g_variant_unref() needs to be called on dbus replies. Bug-AGL: SPEC-2361 Change-Id: Ie8db961f182e77fe5a36c91acddff1e549e7f60a Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-api.c')
-rw-r--r--binding/bluetooth-api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c
index a7c3edd..f594cca 100644
--- a/binding/bluetooth-api.c
+++ b/binding/bluetooth-api.c
@@ -79,6 +79,7 @@ static void mediaplayer1_connect_disconnect(struct bluetooth_state *ns,
reply = bluez_call(ns, BLUEZ_AT_DEVICE, path, state ? "ConnectProfile" : "DisconnectProfile", g_variant_new("(&s)", *tmp), NULL);
if (!reply)
break;
+ g_variant_unref(reply);
}
g_free(path);