[PATCH] bootm: Free allocated fdt buffer in error path
From: Harald Welte <laforge@gnumonks.org>
Date: 2016-02-17 18:56:12
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Harald Welte <laforge@gnumonks.org>
Date: 2016-02-17 18:56:12
Subsystem:
the rest · Maintainer:
Linus Torvalds
It seems like there is a memory leak in an error path of bootm_open_oftree_uimage() where the memory allocated for the fdt is not released again. Signed-off-by: Harald Welte <laforge@gnumonks.org> --- common/bootm.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/common/bootm.c b/common/bootm.c
index 052cffa..7d00f8e 100644
--- a/common/bootm.c
+++ b/common/bootm.c@@ -288,6 +288,7 @@ static int bootm_open_oftree_uimage(struct image_data *data, size_t *size, if (ft != filetype_oftree) { printf("%s is not an oftree but %s\n", data->oftree_file, file_type_to_string(ft)); + free(*fdt); return -EINVAL; }
--
2.7.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox