diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-02-17 19:45:24 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-18 12:58:20 +0100 |
commit | f1f8f5556ab94f4f8bedb97ad0199b2e63958c8b (patch) | |
tree | 87420d3aaa4568f90ff753e5b453b47c611efcb6 | |
parent | 2629cc9d46993b28292f3455093203d7d9fff18c (diff) | |
download | barebox-f1f8f5556ab94f4f8bedb97ad0199b2e63958c8b.tar.gz barebox-f1f8f5556ab94f4f8bedb97ad0199b2e63958c8b.tar.xz |
bootm: Free allocated fdt buffer in error path
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/bootm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c index 052cffa462..7d00f8e012 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; } |