summaryrefslogtreecommitdiff
path: root/tools/perf/python/stackcollapse.py
diff options
context:
space:
mode:
authorLeo Cheng <leo-cheng@vip.qq.com>2026-08-11 20:55:50 +0800
committerSrinivas Kandagatla <srini@kernel.org>2026-09-18 22:37:10 +0100
commitaff113334732214b151c1aa0a69352ab569d8764 (patch)
treee7704a902228c03a8f3af978a9d5ccd445860e0f /tools/perf/python/stackcollapse.py
parent885c33944796ec7ddf6b7babfc0f0710f66bfce3 (diff)
downloadlinux-next-aff113334732214b151c1aa0a69352ab569d8764.tar.gz
linux-next-aff113334732214b151c1aa0a69352ab569d8764.zip
nvmem: layouts: onie-tlv: fix device_node reference leak in error path
onie_tlv_add_cells() takes a reference on the child node via of_get_child_by_name() for each parsed TLV and passes it to nvmem_add_one_cell() as cell.np. On success the created cell entry adopts that reference and releases it later via of_node_put(); on failure nvmem_add_one_cell() does not consume it, so the caller still owns it, but the error path only puts layout before returning, leaking the child node reference. Put cell.np on the error path as well. of_node_put(NULL) is a no-op, so this is safe even when of_get_child_by_name() returned NULL. Fixes: d3c0d12f6474 ("nvmem: layouts: onie-tlv: Add new layout driver") Signed-off-by: Leo Cheng <leo-cheng@vip.qq.com> Reviewed-by: Michael Walle <mwalle@kernel.org> Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions