[PATCH] misc: ocxl: fix possible name leak in ocxl_file_register_afu()
Michael Ellerman
patch-notifications at ellerman.id.au
Wed Nov 30 20:24:21 AEDT 2022
On Fri, 11 Nov 2022 22:59:29 +0800, Yang Yingliang wrote:
> If device_register() returns error in ocxl_file_register_afu(),
> the name allocated by dev_set_name() need be freed. As comment
> of device_register() says, it should use put_device() to give
> up the reference in the error path. So fix this by calling
> put_device(), then the name can be freed in kobject_cleanup(),
> and info is freed in info_release().
>
> [...]
Applied to powerpc/next.
[1/1] misc: ocxl: fix possible name leak in ocxl_file_register_afu()
https://git.kernel.org/powerpc/c/295faa17722a11cac8dbf51e4c9f9405a5e07ef1
cheers
More information about the Linuxppc-dev
mailing list