summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBaoli Zhang <baoli.zhang@linux.intel.com>2026-11-09 08:56:04 +0800
committerMark Brown <broonie@kernel.org>2026-11-10 12:58:49 +0000
commite5c09fe3f9c8d9da33b177ee432db15b6ab46884 (patch)
tree77619084d3e1eaaaeb7c34bf58e83a689c9bf3e6 /scripts
parent8f356232d0d563b82f201d75167a84f6c75a4554 (diff)
ASoC: SOF: ipc4-topology: Fix pin format leak in process widget setup
sof_ipc4_widget_setup_comp_process() allocates the input and output pin format arrays via sof_ipc4_get_audio_fmt(). When the following sof_ipc4_widget_setup_msg() fails, e.g. because the firmware does not provide a module matching the widget UUID, the error path jumps to the 'err' label, which frees the process struct and clears swidget->private but skips sof_ipc4_free_audio_fmt(). The arrays are then unreachable and are reported by kmemleak: sof_ipc4_get_audio_fmt+0xc9/0x420 [snd_sof] sof_ipc4_widget_setup_comp_process+0x8e/0x200 [snd_sof] snd_sof_load_topology+0x71a/0x840 [snd_sof] sof_pcm_probe+0x77/0x120 [snd_sof] snd_soc_component_probe+0x21/0x60 [snd_soc_core] ... Jump to 'free_available_fmt' instead, as the other process widget error paths after sof_ipc4_get_audio_fmt() already do. The other IPC4 widget setup functions (pga, mixer, src, asrc) free the audio formats in their common error label and are not affected. Fixes: f9efae954905 ("ASoC: SOF: ipc4-topology: Add support for base config extension") Cc: stable@vger.kernel.org Signed-off-by: Baoli Zhang <baoli.zhang@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20261109005604.1004362-1-baoli.zhang@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions