Commit: e3e4b3f1101fd5c9e568d446cc06fd512f964937
Parent: 0aa12f83777dfa392fdf6442689699a21aa696e6
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2015-04-02 11:04:36
Tree: 6e9f7e5c94dacce9692b2d2667b619e95fa545b1

shared/gatt-client: Fix invalid read on TP/GAW/CL/BV-05-C This fixes TP/GAW/CL/BV-05-C which destroy bt_gatt_client instance on the called producing the following bracktrace: at 0x445C7C: start_next_long_write.isra.2 (gatt-client.c:2393) by 0x4462A8: execute_write_cb (gatt-client.c:2429) by 0x44099B: handle_rsp (att.c:640) by 0x44099B: can_read_data (att.c:813) by 0x44E4BA: 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) by 0x4E7EEC1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4200.2) by 0x43E791: tester_run (tester.c:831) by 0x43A685: main (test-gatt.c:3935) Address 0x5b12fd8 is 104 bytes inside a block of size 208 free'd at 0x4C2ACE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x446820: bt_gatt_client_unref (gatt-client.c:1694) by 0x43AB7C: destroy_context (test-gatt.c:342) by 0x43AB7C: context_quit (test-gatt.c:370) by 0x43AD0F: test_long_write_cb (test-gatt.c:1029) by 0x446290: execute_write_cb (gatt-client.c:2426) by 0x44099B: handle_rsp (att.c:640) by 0x44099B: can_read_data (att.c:813) by 0x44E4BA: 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) by 0x4E7EEC1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4200.2) by 0x43E791: tester_run (tester.c:831) by 0x43A685: main (test-gatt.c:3935)

Diffstat

M src/shared/gatt-client.c | 4 ++++

1 files changed, 4 insertions(+), 0 deletions(-)

View Full Diff | Patch