Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9f4ca715 authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Greg Kroah-Hartman
Browse files

of: unittest: fix memory leak in unittest_data_add



[ Upstream commit e13de8fe0d6a51341671bbe384826d527afe8d44 ]

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: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: default avatarFrank Rowand <frowand.list@gmail.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c1cb67a7
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