Parent: c6dcf6b714501768ab7ea293e75d945be0eec188
Author: Alex Studer <alex@studer.dev>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-09-18 16:08:43
Tree: 083c378ef0570cba85d0b06c46b10823fe730a91
profiles/audio/a2dp: Clear suspend timer on A2DP stream free When an A2DP stream is created in start_ind, a timer is set, suspending the AVDTP stream if there have been no users within 5 seconds. However, if the AVDTP stream transitions to the IDLE state before the timer fires, the A2DP stream is freed without the timer being cleared. This meant that when the timer fired, it tried to suspend a stream with a pointer that was previously freed and so segfaulted. This commit fixes that by ensuring that suspend_timer is cleared before freeing the A2DP stream. This was causing random segfaults when connecting my Sony WH-1000XM5 headphones.
Diffstat
| M | profiles/audio/a2dp.c | | | 5 | +++++ |
1 files changed, 5 insertions(+), 0 deletions(-)