[PATCH] ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control()

Charles Keepax ckeepax at opensource.cirrus.com
Fri Dec 11 10:46:45 CET 2020


On Wed, Dec 09, 2020 at 09:54:09AM +0300, Dan Carpenter wrote:
> The error handling frees "ctl" but it's still on the "dsp->ctl_list"
> list so that could result in a use after free.  Remove it from the list
> before returning.
> 
> Fixes: 2323736dca72 ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> ---

Good spot there, thanks.

Acked-by: Charles Keepax <ckeepax at opensource.cirrus.com>

Thanks,
Charles


More information about the Alsa-devel mailing list