diff options
| author | 2022-01-24 13:13:46 +0000 | |
|---|---|---|
| committer | 2022-02-13 22:21:41 +0100 | |
| commit | 6a4760463dbc6b603690938c468839985189ce0a (patch) | |
| tree | 101fa978233aa8b360513ee44e83110a7cb81502 /tools/perf/scripts/python | |
| parent | power: supply: PCHG: Use MKBP for device event handling (diff) | |
power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init
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 memory leak by calling kobject_put().
Fixes: 8c0984e5a753 ("power: move power supply drivers to power/supply")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
