Re: [PATCH] kobject: fix possible memory leak in kset_create_and_add()

From: Yang Yingliang
Date: Mon Oct 17 2022 - 04:14:05 EST


Hi,

On 2022/10/17 12:51, Greg KH wrote:
On Mon, Oct 17, 2022 at 10:33:27AM +0800, Yang Yingliang wrote:
If kset_register() fails in kset_create_and_add(), the name allocated
in kset_create() will be leaked.
How is kset_create_and_add() failing? Is this in a real kernel, or
created with a fake fault injection?
Inject fault while probing module qemu_fw_cfg, kset_create_and_add() may fail.

Thanks,
Yang

thanks,

greg k-h
.