summaryrefslogtreecommitdiff
path: root/rust/kernel/debugfs/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorWeigang He <geoffreyhe2@gmail.com>2026-01-17 09:12:38 +0000
committerRob Herring (Arm) <robh@kernel.org>2026-01-17 10:20:43 -0600
commit81122fba08fa3ccafab6ed272a5c6f2203923a7e (patch)
treec5d7cc065c085f5271b111ce238afe7e3758dac0 /rust/kernel/debugfs/git@git.tavy.me:linux.git
parent48e6a9c4a20870e09f85ff1a3628275d6bce31c0 (diff)
of: fix reference count leak in of_alias_scan()
of_find_node_by_path() returns a device_node with its refcount incremented. When kstrtoint() fails or dt_alloc() fails, the function continues to the next iteration without calling of_node_put(), causing a reference count leak. Add of_node_put(np) before continue on both error paths to properly release the device_node reference. Fixes: 611cad720148 ("dt: add of_alias_scan and of_alias_get_id") Cc: stable@vger.kernel.org Signed-off-by: Weigang He <geoffreyhe2@gmail.com> Link: https://patch.msgid.link/20260117091238.481243-1-geoffreyhe2@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions