Commit 0508316
leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata()
netxbig_leds_get_of_pdata() does not release the OF node obtained by
of_parse_phandle() when of_find_device_by_node() fails. Add an
of_node_put() call to fix the leak.
This bug was found by an experimental static analysis tool that I am
developing.
Fixes: 9af512e ("leds: netxbig: Convert to use GPIO descriptors")
Signed-off-by: Joe Hattori <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>1 parent 1c89611 commit 0508316
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| |||
0 commit comments