[PATCH v3 1/2] ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init()

Cezary Rojewski cezary.rojewski at intel.com
Fri Oct 21 14:57:14 CEST 2022


On 2022-10-21 2:38 PM, Yang Yingliang wrote:
> If snd_hdac_device_register() fails, 'codec' and name allocated in
> dev_set_name() called in snd_hdac_device_init() are leaked. Fix this
> by calling put_device(), so they can be freed in snd_hda_codec_dev_release()
> and kobject_cleanup().
> 
> Fixes: e4746d94d00c ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines")
> Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus")
> Suggested-by: Cezary Rojewski <cezary.rojewski at intel.com>
> Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>

Thanks for your report and the fix. For the series:

Reviewed-by: Cezary Rojewski <cezary.rojewski at intel.com>


More information about the Alsa-devel mailing list