Commit: 897e4866f8a490d07ae8b809b0f8e541017cd9ca
Parent: 6bce24212df1c7a11614c2dfcd8bdbdf45263baa
Author: Alex Deymo <deymo@chromium.org>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2013-04-02 09:44:25
Tree: 56b5a613417843e54b1d894514197136fbfe9bad

core: Fix a double free on adapter_stop The discovery_list list has the list of current discovery clients and is removed on adapter_stop (for example due a "power off" command). The g_slist_free_full will call discovery_free on every element of the list and remove the nodes of the list, but discovery_destroy (called by discovery_free) will not only free the element, but also remove it from the list. This causes the list node to be freed twice, once by g_slist_free_full and once by g_slist_remove. This fix calls successively discovery_destroy and lets it remove the list's elements one by one.

Diffstat

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

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

View Full Diff | Patch