[lvc-project] [PATCH 2/3] ASoC: amd: acp3x-pcm-dma: free runtime private data on closing

Fedor Pchelkin pchelkin at ispras.ru
Fri May 30 19:44:15 MSK 2025


Dynamic memory referenced by runtime->private_data pointer is allocated in
acp3x_dma_open() and needs to be freed in the corresponding ->close()
callback.

Found by Linux Verification Center (linuxtesting.org).

Fixes: c9fe7db6e884 ("ASoC: amd: Refactoring of DAI from DMA driver")
Cc: stable at vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin at ispras.ru>
---
 sound/soc/amd/raven/acp3x-pcm-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index bb9ed52d744d..90559c8304bc 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -353,7 +353,7 @@ static int acp3x_dma_close(struct snd_soc_component *component,
 			adata->i2ssp_capture_stream = NULL;
 		}
 	}
-
+	kfree(ins);
 	return 0;
 }
 
-- 
2.49.0




More information about the lvc-project mailing list