diff options
author | saman <mahmoudi.saman1@gmail.com> | 2021-01-27 14:13:08 +0330 |
---|---|---|
committer | saman <mahmoudi.saman1@gmail.com> | 2021-02-02 12:01:38 +0330 |
commit | ce5000f42dbfa854096a6e8c9da34d48ed04ef31 (patch) | |
tree | 81bb4c87b7e85d1745d73a268fe86164ad3c958e /binding | |
parent | b4ebff5a25cf1346b9ea86379a8d25275bb64a32 (diff) |
Fixing double free memory
Bug-AGL: SPEC-3785
Change-Id: I792bac4fe96228840eb5d43abdc4a364d2127207
Signed-off-by: saman <mahmoudi.saman1@gmail.com>
Diffstat (limited to 'binding')
-rw-r--r-- | binding/bluetooth-api.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c index 49ae4e7..8a9945a 100644 --- a/binding/bluetooth-api.c +++ b/binding/bluetooth-api.c @@ -1381,11 +1381,8 @@ static void bluetooth_avrcp_controls(afb_req_t request) if (device) { /* TODO: handle multiple players per device */ jval = bluez_get_property(ns, BLUEZ_AT_MEDIACONTROL, device, FALSE, "Player", NULL); - if (jval) { + if (jval) player = (gchar *)json_object_get_string(jval); - json_object_put(jval); - jval = NULL; - } if (!player) player = g_strconcat(device, "/", BLUEZ_DEFAULT_PLAYER, NULL); g_free(device); |