[PATCH 01/14] ARM: zImage: add missing free() in appended device tree code

Sascha Hauer s.hauer at pengutronix.de
Thu Jan 21 23:32:19 PST 2016


oftree must be freed when the tree is successfully unflattened.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/lib/bootm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 7bb9b43..2439c36 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -223,6 +223,7 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data)
 			ret = -EINVAL;
 			goto err_free;
 		}
+		free(oftree);
 	} else {
 		data->oftree = oftree;
 	}
-- 
2.7.0.rc3




More information about the barebox mailing list