[PATCH] ASOC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init()

Mark Brown broonie at kernel.org
Tue Nov 1 19:29:54 CET 2022


On Thu, Oct 20, 2022 at 11:47:52AM +0800, Yang Yingliang wrote:
> If snd_hdac_device_register() fails, 'codec' is leaked, free it
> in snd_hdac_device_exit(). And device_initialize() is called in
> snd_hdac_device_init(), it should call put_device() to give up
> reference or the name allocated in dev_set_name() is leaked.
> The snd_hdac_device_exit() will be called in dev->release().

This doesn't apply against current code, please check and resend.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20221101/b0897ccd/attachment.sig>


More information about the Alsa-devel mailing list