diff options
| author | Rosen Penev <rosenp@gmail.com> | 2026-08-11 11:51:40 -0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-08-11 23:08:26 +0100 |
| commit | b992511180e126150c6ad3580a6fd568c385f4c6 (patch) | |
| tree | 06553e403734f28fc1a9558dc3bacc8355577de8 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 071497d28403848edb1844e18234a8b7786d3b6f (diff) | |
ASoC: xilinx: formatter_pcm: fix stream_data leak on open error
In xlnx_formatter_pcm_open(), stream_data is allocated and
adata->play_stream or adata->capture_stream is assigned early. If a
later step, such as snd_pcm_hw_constraint_step() or
snd_pcm_hw_constraint_integer(), fails, the function returns the error
immediately. ALSA does not call the close callback when open fails, so
stream_data is leaked and the stream pointer is left dangling, pointing
to a substream that ALSA frees. A later interrupt would then call
snd_pcm_period_elapsed() on the freed substream.
Free stream_data and clear the stream pointer on the error paths.
Fixes: 6f6c3c36f091 ("ASoC: xlnx: add pcm formatter platform driver")
Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20260811185140.27149-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
