Files
linux/drivers
Miaoqian Lin 660ba678f9 firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
kobject_init_and_add() takes reference even when it fails.
According to the doc of kobject_init_and_add()

   If this function returns an error, kobject_put() must be called to
   properly clean up the memory associated with the object.

Fix this issue by calling kobject_put().

Fixes: 948af1f0bb ("firmware: Basic dmi-sysfs support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511071421.9769-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-19 18:56:56 +02:00
..
2022-04-27 09:41:54 -07:00
2022-04-06 08:47:52 -06:00
2022-05-02 13:49:24 +02:00
2022-04-08 12:59:43 -07:00
2022-04-27 20:36:47 +02:00
2022-03-27 22:18:39 +02:00
2022-04-28 16:51:24 +02:00