diff options
| author | Qiushi Wu <wu000273@umn.edu> | 2020-05-03 02:33:38 +0300 |
|---|---|---|
| committer | Sebastian Reichel <sre@kernel.org> | 2020-05-03 03:17:13 +0300 |
| commit | 1d7a7128a2e9e1f137c99b0a44e94d70a77343e3 (patch) | |
| tree | 8b3230a644063cbaffed7dd23c75f2c5fd645d31 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 21d4cdf8b3c4352c38a36acee4c5bdc44cf5a1bc (diff) | |
| download | linux-1d7a7128a2e9e1f137c99b0a44e94d70a77343e3.tar.xz | |
power: supply: core: fix memory leak in HWMON error path
In function power_supply_add_hwmon_sysfs(), psyhw->props is
allocated by bitmap_zalloc(). But this pointer is not deallocated
when devm_add_action fail, which lead to a memory leak bug. To fix
this, we replace devm_add_action with devm_add_action_or_reset.
Cc: stable@kernel.org
Fixes: e67d4dfc9ff19 ("power: supply: Add HWMON compatibility layer")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
