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

Skip to content
Commit 3a2dbd61 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Anton Vorontsov
Browse files

power_supply: Fix use after free and memory leak



device_unregister() might free its argument.  This leads to freed
memory use in kfree().  Also use put_device() instead of kfree()
as dev may be already used in another layer after call to device_add().

Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 26eb3872
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment