diff options
author | saman <mahmoudi.saman1@gmail.com> | 2021-01-27 14:13:08 +0330 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2021-02-03 11:14:57 +0000 |
commit | 4704a703f34cb12321c3b13a423f5a1df7f89439 (patch) | |
tree | 9c505840dbfd86c082995fccd1395c948984be97 | |
parent | ad4b0c6576fb88f550397356e1af5a2f5dc4f47c (diff) |
Fixing double free memorykoi_11.0.5koi_11.0.4koi_11.0.3koi_11.0.2koi_11.0.1koi_11.0.0koi_10.93.1koi/11.0.5koi/11.0.4koi/11.0.3koi/11.0.2koi/11.0.1koi/11.0.0koi/10.93.111.0.511.0.411.0.311.0.211.0.111.0.010.93.1koi
Bug-AGL: SPEC-3785
Change-Id: I792bac4fe96228840eb5d43abdc4a364d2127207
Signed-off-by: saman <mahmoudi.saman1@gmail.com>
(cherry picked from commit ce5000f42dbfa854096a6e8c9da34d48ed04ef31)
-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); |