mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
bluetooth: set u->transport null when it has been freed
Prevent a pointer to freed memory from lingering around.
This commit is contained in:
parent
90fd392101
commit
f70a1672c6
1 changed files with 3 additions and 0 deletions
|
|
@ -2439,6 +2439,9 @@ static pa_hook_result_t transport_state_changed_cb(pa_bluetooth_discovery *y, pa
|
|||
if (t->device == u->device)
|
||||
handle_transport_state_change(u, t);
|
||||
|
||||
if (t == u->transport && t->state <= PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED)
|
||||
u->transport = NULL;
|
||||
|
||||
return PA_HOOK_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue