Skip to content
Commit 60d3b4c7 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Paul Gortmaker
Browse files

mtd: rawnand: oxnas: Add of_node_put()



commit c436f68b upstream.

Each iteration of for_each_child_of_node puts the previous node, but in
the case of a goto from the middle of the loop, there is no put, thus
causing a memory leak. Hence add an of_node_put under a new goto to put
the node at a loop exit.
Issue found with Coccinelle.

Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 88296b93
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment