Re: [PATCH] of: unittest: fix memory leak in attach_node_and_children

2019-11-20 Thread Tyrel Datwyler
On 11/14/19 10:43 AM, Erhard Furtner wrote: > In attach_node_and_children memory is allocated for full_name via > kasprintf. If the condition of the 1st if is not met the function > returns early without freeing the memory. Add a kfree() to fix that. > > Signed-off-by: Erhard Furtner Michael

Re: [PATCH] of: unittest: fix memory leak in attach_node_and_children

2019-11-18 Thread Michael Ellerman
Erhard Furtner writes: > In attach_node_and_children memory is allocated for full_name via > kasprintf. If the condition of the 1st if is not met the function > returns early without freeing the memory. Add a kfree() to fix that. It would be good to mention that this was detected with kmemleak.