diff options
| author | Anel Orazgaliyeva <anelkz@amazon.de> | 2021-09-06 18:34:40 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 11:58:39 +0100 |
| commit | b8ee07384a44d5ff585d570bc14c014a412f4b3a (patch) | |
| tree | b87c271d04e566a313937c9dce6089381aa896a5 /tools/perf/scripts/python | |
| parent | 324b9699dacd484cd0decc4f97a6476e675757ff (diff) | |
cpuidle: Fix kobject memory leaks in error paths
[ Upstream commit e5f5a66c9aa9c331da5527c2e3fd9394e7091e01 ]
Commit c343bf1ba5ef ("cpuidle: Fix three reference count leaks")
fixes the cleanup of kobjects; however, it removes kfree() calls
altogether, leading to memory leaks.
Fix those and also defer the initialization of dev->kobj_dev until
after the error check, so that we do not end up with a dangling
pointer.
Fixes: c343bf1ba5ef ("cpuidle: Fix three reference count leaks")
Signed-off-by: Anel Orazgaliyeva <anelkz@amazon.de>
Suggested-by: Aman Priyadarshi <apeureka@amazon.de>
[ rjw: Subject edits ]
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')
0 files changed, 0 insertions, 0 deletions
