Re: [PATCH] media: platform: sti: c8sectpfe: core: Add of_node_put() at goto

2019-07-16 Thread Patrice CHOTARD
Hi Nishka On 7/16/19 7:38 AM, Nishka Dasgupta wrote: > 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 a new label that puts the last used > node, and edit the goto st

[PATCH] media: platform: sti: c8sectpfe: core: Add of_node_put() at goto

2019-07-15 Thread Nishka Dasgupta
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 a new label that puts the last used node, and edit the goto statements in the middle of the loop to first go to the new labe