diff options
author | Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> | 2024-12-10 22:09:12 +0900 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2024-12-10 14:53:49 -0800 |
commit | 28fa3291cad1c201967ef93edc6e7f8ccc9afbc0 (patch) | |
tree | 9a045fe9c4df74629efb9ba989391c57ef9405f6 /scripts/gdb/linux/interrupts.py | |
parent | e5ca5d7b4d7c29246d957dc45d63610584ae3a54 (diff) |
clk: fix an OF node reference leak in of_clk_get_parent_name()
Current implementation of of_clk_get_parent_name() leaks an OF node
reference on error path. Add a of_node_put() call before returning an
error.
This bug was found by an experimental static analysis tool that I am
developing.
Fixes: 8da411cc1964 ("clk: let of_clk_get_parent_name() fail for invalid clock-indices")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20241210130913.3615205-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions