projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1501f2
)
ASoC: SOF: topology: Fix mem leak in sof_dai_load()
author
Kamil Duljas
<kamil.duljas@gmail.com>
Thu, 16 Nov 2023 21:39:17 +0000
(22:39 +0100)
committer
Mark Brown
<broonie@kernel.org>
Fri, 17 Nov 2023 12:47:50 +0000
(12:47 +0000)
The function has multiple return points at which it is not released
previously allocated memory.
Signed-off-by: Kamil Duljas <kamil.duljas@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link:
https://lore.kernel.org/r/20231116213926.2034-2-kamil.duljas@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c
patch
|
blob
|
history
diff --git
a/sound/soc/sof/topology.c
b/sound/soc/sof/topology.c
index a3a3af252259d9f447da23381bc9cb37d2e22311..37ec671a2d766fb34cc78e08d7a5aeb8f619381b 100644
(file)
--- a/
sound/soc/sof/topology.c
+++ b/
sound/soc/sof/topology.c
@@
-1736,8
+1736,10
@@
static int sof_dai_load(struct snd_soc_component *scomp, int index,
/* perform pcm set op */
if (ipc_pcm_ops && ipc_pcm_ops->pcm_setup) {
ret = ipc_pcm_ops->pcm_setup(sdev, spcm);
- if (ret < 0)
+ if (ret < 0) {
+ kfree(spcm);
return ret;
+ }
}
dai_drv->dobj.private = spcm;