firmware: Fix a reference count leak.
kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Callback function fw_cfg_sysfs_release_entry() in kobject_put() can handle the pointer "entry" properly. Signed-off-by: Qiushi Wu <wu000273@umn.edu> Link: https://lore.kernel.org/r/20200613190533.15712-1-wu000273@umn.edu Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
parent
92ed3019
-
mentioned in commit 937dafe8
-
mentioned in commit 44c8b477
-
mentioned in commit d3e30559
-
mentioned in commit 6004e351
-
mentioned in commit 889c7330
-
mentioned in commit 6b8c3a18
-
mentioned in commit 8840daa2
-
mentioned in commit db3337ba
-
mentioned in commit fd8a2f12
-
mentioned in commit 1f21b193
-
mentioned in commit 5c69ba9e
-
mentioned in commit 1cc36ed5
-
mentioned in commit c6ae8717
-
mentioned in commit ad2df17f
-
mentioned in commit 79a0d453
-
mentioned in commit 018bf567
Please register or sign in to comment