summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorSumeet Pawnikar <sumeet4linux@gmail.com>2026-05-15 21:26:16 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-05-26 16:00:42 +0300
commitbfc7d93bc5e12288e5dc6bb54260f68cdf5a5c47 (patch)
treeabb4e43ab9fa6ca5f2e5a586e8d1e5e79867a734 /include/linux/stackprotector.h
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d (diff)
downloadlinux-bfc7d93bc5e12288e5dc6bb54260f68cdf5a5c47.tar.xz
powercap: intel_rapl: Fix memory leak in rapl_add_package_cpuslocked()
When topology_physical_package_id()/topology_logical_die_id() returns a negative value, rapl_add_package_cpuslocked() returns ERR_PTR(-EINVAL) directly without freeing the rapl_package structure that was just allocated by kzalloc_obj(), leaking memory on every failed package addition. Use the existing err_free_package label so that the allocation is released on the error path. Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com> Link: https://patch.msgid.link/20260515182616.227707-1-sumeet4linux@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions