Parent: 791e8173e44bb36eae177d9d94d5ffe65fe4816e
Author: Anderson Lizardo <anderson.lizardo@openbossa.org>
Committer: Szymon Janc <szymon.janc@tieto.com>
Date: 2014-01-27 22:48:02
Tree: b643df8a7628b7467673f51f6a4ddd906d09ef93
android/tester: Fix crash on failure inside setup() The various setup_* functions were still continuing even though setup() failed and did not initialize data->if_bluetooth properly. Also do a little refactoring by moving tester_setup_failed() calls to the setup() callers, so they stay close to the other failure points and not hidden deep into a helper function. Crash detected by Valgrind: ==4959== Invalid read of size 4 ==4959== at 0x805967A: setup_base (android-tester.c:2029) ==4959== by 0x8055541: setup_callback (tester.c:373) ==4959== by 0x408348F: g_idle_dispatch (gmain.c:5250) ==4959== by 0x4086A75: g_main_context_dispatch (gmain.c:3065) ==4959== by 0x4086E14: g_main_context_iterate.isra.23 (gmain.c:3712) ==4959== by 0x40872FA: g_main_loop_run (gmain.c:3906) ==4959== by 0x41744D2: (below main) (libc-start.c:226) ==4959== Address 0x4 is not stack'd, malloc'd or (recently) free'd
Diffstat
| M | android/android-tester.c | | | 85 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
1 files changed, 46 insertions(+), 39 deletions(-)