Commit: e892dd0cd7689c1ffb8ad2c07113acc9d19e3973
Parent: 00852d31df223537b8ce2b8fc9a714a10d31c9f5
Author: Pavel Maltsev <pavelm@google.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-11-20 01:59:59
Tree: dcfe07b994d9fa2c64a200d6f9d92ab6902bada9

gatt: Fix duplicate free for GATT service includes Objects in the service->includes queue are obtained via dbus_message_iter_get_basic call and according to the contract for the value is that it is returned by the reference and should not be freed thus we should make a copy. This will fix the issue when the GATT service app is disconnected (reproduced with gatt-service included in bluez), bluetoothd is crashing: bluetoothd: src/gatt-database.c:gatt_db_service_removed() Local GATT service removed bluetoothd: src/adapter.c:adapter_service_remove() /org/bluez/hci0 bluetoothd: src/adapter.c:remove_uuid() sending remove uuid command for index 0 bluetoothd: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10006 bluetoothd: src/gatt-database.c:proxy_removed_cb() Proxy removed - removing service: /service1 munmap_chunk(): invalid pointer

Diffstat

M src/gatt-database.c | 7 ++++++-

1 files changed, 6 insertions(+), 1 deletions(-)

View Full Diff | Patch