Skip to content
Commit fe3c6068 authored by Qiushi Wu's avatar Qiushi Wu Committed by Michael S. Tsirkin
Browse files

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: default avatarQiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200613190533.15712-1-wu000273@umn.edu


Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 92ed3019
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment