mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 05:34:23 +08:00
android/a2dp: Fix freeing preset on SEP close
In case SEP was opened from local side, corresponding a2dp_setup structure has just reference to a2dp_preset which is stored on presets list. As a result, when closing SEP such preset will be freed leaving dangling pointer on presets list.
This commit is contained in:
parent
63ffbe33a5
commit
e21b24d825
@ -647,7 +647,9 @@ static void setup_free(void *data)
|
||||
{
|
||||
struct a2dp_setup *setup = data;
|
||||
|
||||
preset_free(setup->preset);
|
||||
if (!g_slist_find(setup->endpoint->presets, setup->preset))
|
||||
preset_free(setup->preset);
|
||||
|
||||
g_free(setup);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user