Re: [PATCH] of: unittest: fix memory leak in unittest_data_add
From: Rob Herring
Date: Tue Oct 15 2019 - 15:41:09 EST
On Fri, 4 Oct 2019 13:58:43 -0500, Navid Emamdoost wrote:
> In unittest_data_add, a copy buffer is created via kmemdup. This buffer
> is leaked if of_fdt_unflatten_tree fails. The release for the
> unittest_data buffer is added.
>
> Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
> Signed-off-by: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
> ---
> drivers/of/unittest.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied, thanks.
Rob