[bluez/bluez] 484885: profiles/audio/a2dp: Clear suspend timer on A2DP s...

From: Alex Studer <hidden>
Date: 2025-09-12 18:45:57

  Branch: refs/heads/1001921
  Home:   https://github.com/bluez/bluez
  Commit: 48488578b35ed19e92f6f9e50fe7551ccc0f510e
      https://github.com/bluez/bluez/commit/48488578b35ed19e92f6f9e50fe7551ccc0f510e
  Author: Alex Studer [off-list ref]
  Date:   2025-09-12 (Fri, 12 Sep 2025)

  Changed paths:
    M profiles/audio/a2dp.c

  Log Message:
  -----------
  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.

Signed-off-by: Alex Studer <redacted>



To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help