diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-26 16:38:45 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-11 13:41:54 +0100 |
| commit | f93ae43780b759a70734be9bc82c1adcf7f33208 (patch) | |
| tree | 7503d43651997803c1bf61c2c357330682c908c3 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 245ff08e261ce3cb9158fc5bf75927a02d598a3b (diff) | |
platform/x86: toshiba_haps: Fix memory leaks in add/remove routines
[ Upstream commit 128497456756e1b952bd5a912cd073836465109d ]
toshiba_haps_add() leaks the haps object allocated by it if it returns
an error after allocating that object successfully.
toshiba_haps_remove() does not free the object pointed to by
toshiba_haps before clearing that pointer, so it becomes unreachable
allocated memory.
Address these memory leaks by using devm_kzalloc() for allocating
the memory in question.
Fixes: 23d0ba0c908a ("platform/x86: Toshiba HDD Active Protection Sensor")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
