Commit: af2873b2691291e165b3ee3f24b651433885537f
Parent: 491e5b35370099bf61ef89ca9dcdcf6b6b4c4f89
Author: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-06-03 16:19:17
Tree: c881c8113c198a660a1c55f6c9b63652c0cd0a22

shared/bap: Fix potential stream access after free In bap_bcast_set_state, state->func might trigger the stream to be released, thus the stream would have been freed before reaching the switch. After calling stream->func, the stream reference should not be accessed anymore, apart from when the stream has not yet been released and those cases will be handled inside the switch. This commit also handles the case when stream ops might lead to a state machine that ends with stream release, so the stream should avoid being accessed after the ops are executed.

Diffstat

M src/shared/bap.c | 22 +++++++++++++++++- - - - -

1 files changed, 17 insertions(+), 5 deletions(-)

View Full Diff | Patch