From ef871e6e5151b47387348ab8d9e21aeeed072b86 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Sun, 5 May 2019 19:48:15 -0700 Subject: 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 --- binding/bluetooth-api.c | 1 + 1 file changed, 1 insertion(+) (limited to 'binding/bluetooth-api.c') 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); -- cgit 1.2.3-korg