Commit: 553ebe6dbb7dbeb9793814fd313774b21cb55d5f
Parent: 3169c1bef44c0c9a53121c9f3a15ab94509cf65e
Author: Claudio Takahasi <claudio.takahasi@openbossa.org>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2011-09-22 13:59:33
Tree: 54f11805696d33e7c890e48943d1e753ca68ba92

Fix invalid free when stopping adapter This patch fix an "invalid free" error when the adapter is powered off with an active discovery session. Error happens because session_remove function removes the elements from the list also. Partial valgrind log: Address 0x6012a00 is 0 bytes inside a block of size 16 free'd at 0x4C27DCC: free (vg_replace_malloc.c:366) by 0x4E927AC: g_slist_remove (in by 0x19F788: session_remove (adapter.c:689) by 0x19F82A: session_free (adapter.c:708) by 0x4E92CD6: g_slist_foreach (in by 0x4E92CFA: g_slist_free_full (in by 0x1A3ADD: btd_adapter_stop (adapter.c:2491)

Diffstat

M src/adapter.c | 20 +++++++++++++- - - - - - -

1 files changed, 13 insertions(+), 7 deletions(-)

View Full Diff | Patch