Skip to contentSkip to conversation

ASoC: amd: raven: Fix memory leak in acp3x_dma_close()

PATCH In review [email protected] 2 participants 2 messages Oct 16 – Oct 24

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: amd: raven: Fix memory leak in acp3x_dma_close()

From: bui duc phuc <[email protected]>

acp3x_dma_open() allocates a struct i2s_stream_instance for each substream, but acp3x_dma_close() never frees it, leaking it on every open/close cycle.

Free it in acp3x_dma_close().

Fixes 9f7041b71a2f ("ASoC: amd: closing specific instance.")
---
 sound/soc/amd/raven/acp3x-pcm-dma.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/amd/raven/acp3x-pcm-dma.c +2 -0
index 765057499021..0862a431b2d1 100644
@@ -360,6 +360,8 @@ static int acp3x_dma_close(struct snd_soc_component *component,
 		}
 	}
 
+	kfree(ins);
+
 	return 0;
 }
 
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 1 line · On Fri, 16 Oct 2026 15:50:47 +0700, [email protected] wrote:

ASoC: amd: raven: Fix memory leak in acp3x_dma_close()

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/1] ASoC: amd: raven: Fix memory leak in acp3x_dma_close()

      https://git.kernel.org/broonie/sound/c/e0b17f84f6e3

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark