Skip to content

Commit b6570fd

Browse files
smaeulbroonie
authored andcommitted
ASoC: codec2codec: avoid invalid/double-free of pcm runtime
The PCM runtime was freed during PMU in the case that the event hook encountered an error. However, it is also unconditionally freed during PMD. Avoid a double-free by dropping the call to kfree in the PMU hook. Fixes: a72706e ("ASoC: codec2codec: remove ephemeral variables") Cc: [email protected] Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1880b1f commit b6570fd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sound/soc/soc-dapm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3916,9 +3916,6 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
39163916
runtime->rate = params_rate(params);
39173917

39183918
out:
3919-
if (ret < 0)
3920-
kfree(runtime);
3921-
39223919
kfree(params);
39233920
return ret;
39243921
}

0 commit comments

Comments
 (0)