Hi Claudio, On Tue, Sep 20, 2011, Claudio Takahasi wrote: > 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) > --- > src/adapter.c | 20 +++++++++++++------- > 1 files changed, 13 insertions(+), 7 deletions(-) Applied. Thanks. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html