]> git.baikalelectronics.ru Git - uboot.git/commit
fdtdec: test: Fix memory leak
authorThierry Reding <treding@nvidia.com>
Mon, 20 May 2019 16:05:04 +0000 (18:05 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 10 Jul 2019 22:52:58 +0000 (16:52 -0600)
commitfc2f32ae339ffec44d06bd7485427885aeda0775
treebfdd8240b436f9846bb9c5ae2233ef94744f4c87
parent4fddbc80ba09d9e9565fbc975f7cf490b0c484d4
fdtdec: test: Fix memory leak

Free the memory allocated to store the test FDT upon test completion to
avoid leaking the memory. We don't bother cleaning up on test failure
since the code is broken in that case and should be fixed, in which case
the leak would also go away.

Reported-by: Tom Rini <tom.rini@gmail.com>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/fdtdec_test.c