mirror of https://github.com/torvalds/linux.git
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:
|
||
|---|---|---|
| .. | ||
| unittest-data | ||
| .kunitconfig | ||
| Kconfig | ||
| Makefile | ||
| address.c | ||
| base.c | ||
| cpu.c | ||
| device.c | ||
| dynamic.c | ||
| empty_root.dts | ||
| fdt.c | ||
| fdt_address.c | ||
| irq.c | ||
| kexec.c | ||
| kobj.c | ||
| kunit_overlay_test.dtso | ||
| module.c | ||
| of_kunit_helpers.c | ||
| of_numa.c | ||
| of_private.h | ||
| of_reserved_mem.c | ||
| of_test.c | ||
| overlay.c | ||
| overlay_test.c | ||
| pdt.c | ||
| platform.c | ||
| property.c | ||
| resolver.c | ||
| unittest.c | ||