of: unittest: fix memory leak in unittest_data_add
BugLink: https://bugs.launchpad.net/bugs/1852110 [ Upstream commit e13de8fe ] 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: b951f9dc ("Enabling OF selftest to run without machine's devicetree") Signed-off-by:Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by:
Frank Rowand <frowand.list@gmail.com> Signed-off-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Connor Kuehl <connor.kuehl@canonical.com> Signed-off-by:
Khalid Elmously <khalid.elmously@canonical.com>
Showing
Please register or sign in to comment