[PATCH] ASoC: amd: raven: Fix memory leak in acp3x_dma_close()
From: phucduc . bui
Date: Fri Oct 16 2026 - 04:51:16 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
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@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/sashiko-outbox-173760@xxxxxxxxxx/
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
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