Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83fc0cb8 authored by Qiushi Wu's avatar Qiushi Wu Committed by Sasha Levin
Browse files

efi/esrt: Fix reference count leak in esre_create_sysfs_entry.



[ Upstream commit 4ddf4739be6e375116c375f0a68bf3893ffcee21 ]

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. Previous
commit "b8eb718348b8" fixed a similar problem.

Fixes: 0bb54905 ("efi: Add esrt support")
Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200528183804.4497-1-wu000273@umn.edu


Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7e2632ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment