Parent: 247aa7074a41e3b4fe0d86200fbd9c87f32c7837
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2015-03-12 14:02:37
Tree: 6d1fa6b9e818ce2bb8bfd709d066d8bb68e78173
shared/gatt-client: Fix invalid read This fixes the following trace caused by last changes which included prepare write support but broke cancel_request code: Invalid read of size 1 at 0x43E726: cancel_request (gatt-client.c:1854) by 0x447E4F: queue_remove_all (queue.c:387) by 0x43F19A: bt_gatt_client_cancel_all (gatt-client.c:1866) by 0x43F250: bt_gatt_client_free (gatt-client.c:1569) by 0x43F3D0: bt_gatt_client_unref (gatt-client.c:1692) by 0x43380C: destroy_context (test-gatt.c:284) by 0x43380C: context_quit (test-gatt.c:312) by 0x433E77: test_read_cb (test-gatt.c:677) by 0x43C260: read_cb (gatt-client.c:1924) by 0x43948B: handle_rsp (att.c:640) by 0x43948B: can_read_data (att.c:813) by 0x446DAA: watch_callback (io-glib.c:170) by 0x4E7E7FA: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4200.2) by 0x4E7EB97: ??? (in /usr/lib64/libglib-2.0.so.0.4200.2) Address 0x57f0908 is 8 bytes inside a block of size 40 free'd at 0x4C2ACE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x43E06F: request_unref (gatt-client.c:160) by 0x4389C6: cancel_att_send_op (att.c:222) by 0x4389C6: bt_att_cancel (att.c:1194) by 0x43E71D: cancel_request (gatt-client.c:1852) by 0x447E4F: queue_remove_all (queue.c:387) by 0x43F19A: bt_gatt_client_cancel_all (gatt-client.c:1866) by 0x43F250: bt_gatt_client_free (gatt-client.c:1569) by 0x43F3D0: bt_gatt_client_unref (gatt-client.c:1692) by 0x43380C: destroy_context (test-gatt.c:284) by 0x43380C: context_quit (test-gatt.c:312) by 0x433E77: test_read_cb (test-gatt.c:677) by 0x43C260: read_cb (gatt-client.c:1924) by 0x43948B: handle_rsp (att.c:640) by 0x43948B: can_read_data (att.c:813)
Diffstat
| M | src/shared/gatt-client.c | | | 44 | +++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
1 files changed, 15 insertions(+), 29 deletions(-)