linux-stable/sound/soc/sof
Peter Ujfalusi 5708cc2f4b
ASoC: SOF: topology: Fix memory leak of scontrol->name
The scontrol->name is allocated with kstrdup, it must be freed before the
scontrol is freed to avoid leaking memory.

The constant leaking happens via sof_widget_unload() path on every module
removal.

Fixes: b5cee8feb1 ("ASoC: SOF: topology: Make control parsing IPC agnostic")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220331114845.32747-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-04 14:25:38 +01:00
..
amd ASoC: SOF: Make pcm_hw_params snd_sof_dsp_ops callback IPC neutral 2022-03-11 13:41:01 +00:00
imx ASoC: SOF: imx: Convert to use the generic set_stream_data_offset ops 2022-03-11 13:41:08 +00:00
intel ASoC: Fixes for v5.18 2022-03-30 14:04:22 +02:00
mediatek ASoC: SOF: OF: Avoid reverse module dependency 2021-12-15 14:02:50 +00:00
xtensa ASoC: SOF: dsp_arch_ops: add kernel log level parameter for oops and stack 2021-12-23 13:38:25 +00:00
compress.c ASoC: SOF: compress: fix null check after dereference 2022-03-11 13:40:54 +00:00
control.c ASoC: SOF: Add bytes_ext control IPC ops for IPC3 2022-03-18 16:04:44 +00:00
core.c ASoC: SOF: Introduce struct snd_sof_dai_link 2022-03-16 16:38:54 +00:00
debug.c ASoC: SOF: debug: clarify operator precedence 2022-03-07 13:12:54 +00:00
iomem-utils.c ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
ipc.c ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
ipc3-control.c ASoC: SOF: Add bytes_ext control IPC ops for IPC3 2022-03-18 16:04:44 +00:00
ipc3-ops.h ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
ipc3-pcm.c ASoC: SOF: Add dai_link_fixup PCM op for IPC3 2022-03-18 16:04:50 +00:00
ipc3-topology.c ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
ipc3.c ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
Kconfig ASoC: SOF: Convert the generic probe support to SOF client 2022-02-10 15:19:12 +00:00
loader.c ASoC: SOF: Set SOF_FW_BOOT_FAILED in case we have failure during boot 2021-12-23 13:38:20 +00:00
Makefile ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
nocodec.c ASOC: SOF: simplify nocodec mode 2021-04-12 17:05:55 +01:00
ops.c ASoC: SOF: ops: Always print DSP Panic message but use different message 2021-12-23 13:38:24 +00:00
ops.h ASoC: SOF: Remove ipc_pcm_params() ops 2022-03-11 13:41:09 +00:00
pcm.c ASoC: SOF: Add dai_link_fixup PCM op for IPC3 2022-03-18 16:04:50 +00:00
pm.c ASoC: SOF: topology: Add ops for setting up and tearing down pipelines 2022-03-18 16:04:52 +00:00
sof-acpi-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-acpi-dev.h
sof-audio.c ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
sof-audio.h ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
sof-client-ipc-flood-test.c ASoC: SOF: Convert the generic IPC flood test into SOF client 2022-02-10 15:19:09 +00:00
sof-client-ipc-msg-injector.c ASoC: SOF: ipc-msg-injector: Use devm_kzalloc() for the rx_buffer 2022-03-09 17:34:59 +00:00
sof-client-probes.c ASoC: SOF: Convert the generic probe support to SOF client 2022-02-10 15:19:12 +00:00
sof-client-probes.h ASoC: SOF: Convert the generic probe support to SOF client 2022-02-10 15:19:12 +00:00
sof-client.c ASoC: SOF: Convert the generic IPC message injector into SOF client 2022-02-10 15:19:10 +00:00
sof-client.h ASoC: SOF: Introduce IPC SOF client support 2022-02-10 15:19:06 +00:00
sof-of-dev.c ASoC: SOF: OF: Avoid reverse module dependency 2021-12-15 14:02:50 +00:00
sof-of-dev.h ASoC: SOF: OF: Avoid reverse module dependency 2021-12-15 14:02:50 +00:00
sof-pci-dev.c ASoC: SOF: Intel: add topology overwrite for Taniks 2022-03-11 13:40:56 +00:00
sof-pci-dev.h ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
sof-priv.h ASoC: SOF: Introduce IPC-specific PCM ops 2022-03-18 16:04:45 +00:00
sof-utils.c ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
sof-utils.h ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
stream-ipc.c ASoC: SOF: Remove ipc_pcm_params() ops 2022-03-11 13:41:09 +00:00
topology.c ASoC: SOF: topology: Fix memory leak of scontrol->name 2022-04-04 14:25:38 +01:00
trace.c ASoC: SOF: trace: Use proper DMA direction for the trace data buffer 2022-03-11 13:40:55 +00:00