]> git.baikalelectronics.ru Git - kernel.git/commit
openrisc: Fix a memory leak
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 23 Apr 2021 15:09:28 +0000 (17:09 +0200)
committerStafford Horne <shorne@gmail.com>
Wed, 28 Apr 2021 12:40:44 +0000 (21:40 +0900)
commit7d0f14f19f72ede0f756ed0766d4b47fd8e6ce35
tree7f496dfd9cd95e8c24b43097e4d0fb5c2fb51ca2
parent0efbc779a2d5e8b3dff33fc281510a13f9fa1166
openrisc: Fix a memory leak

'setup_find_cpu_node()' take a reference on the node it returns.
This reference must be decremented when not needed anymore, or there will
be a leak.

Add the missing 'of_node_put(cpu)'.

Note that 'setup_cpuinfo()' that also calls this function already has a
correct 'of_node_put(cpu)' at its end.

Fixes: 8cdbc28ac2eb ("OpenRISC: Boot code")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/setup.c