From: phucduc.bui@gmail.com
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Kees Cook <kees@kernel.org>,
Ravulapati Vishnu vardhan rao
<Vishnuvardhanrao.Ravulapati@amd.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>,
sashiko-reviews <sashiko-bot@kernel.org>
Subject: [PATCH] ASoC: amd: raven: Fix memory leak in acp3x_dma_close()
Date: Fri, 16 Oct 2026 15:50:47 +0700 [thread overview]
Message-ID: <20261016085047.535265-1-phucduc.bui@gmail.com> (raw)
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
reply other threads:[~2026-10-16 8:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016085047.535265-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=Vishnuvardhanrao.Ravulapati@amd.com \
--cc=broonie@kernel.org \
--cc=kees@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sashiko-bot@kernel.org \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.