]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
of: unittest: kmemleak in of_unittest_overlay_high_level()
authorFrank Rowand <frank.rowand@sony.com>
Thu, 16 Apr 2020 21:42:48 +0000 (16:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:30:14 +0000 (10:30 +0200)
commite04087b3f43ae47d646ed83eabc7911a333d1c33
treeb6e0ca19f10df8ec7d5a05e995f29927eaa1f34e
parent842f7bbaf44cdc5da018474c23938843db6e500b
of: unittest: kmemleak in of_unittest_overlay_high_level()

commit 145fc138f9aae4f9e1331352e301df28e16aed35 upstream.

kmemleak reports several memory leaks from devicetree unittest.
This is the fix for problem 3 of 5.

of_unittest_overlay_high_level() failed to kfree the newly created
property when the property named 'name' is skipped.

Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
Reported-by: Erhard F. <erhard_f@mailbox.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/unittest.c