Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: raven: Fix memory leak in acp3x_dma_close()
@ 2026-10-16  8:50 phucduc.bui
  0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-10-16  8:50 UTC (permalink / raw)
  To: Vijendar Mukunda, Venkata Prasad Potturu, Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
	Kees Cook, Ravulapati Vishnu vardhan rao, linux-sound,
	linux-kernel, bui duc phuc, sashiko-reviews

From: bui duc phuc <phucduc.bui@gmail.com>

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.")
Reported-by: sashiko-reviews <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/sashiko-outbox-173760@kernel.org/
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/amd/raven/acp3x-pcm-dma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 765057499021..0862a431b2d1 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -360,6 +360,8 @@ static int acp3x_dma_close(struct snd_soc_component *component,
 		}
 	}
 
+	kfree(ins);
+
 	return 0;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-16  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16  8:50 [PATCH] ASoC: amd: raven: Fix memory leak in acp3x_dma_close() phucduc.bui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox