diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-22 12:23:34 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-24 09:03:17 +0200 |
commit | 3c2df61f635e44c1e77ea4a928bcd35b18a1eb45 (patch) | |
tree | 1a3aaa9f906190dc56b667b85a0cca50eae78241 /common/bootm.c | |
parent | 47974cac82a59427972373a6d0e6c23eda81ba3b (diff) | |
download | barebox-3c2df61f635e44c1e77ea4a928bcd35b18a1eb45.tar.gz barebox-3c2df61f635e44c1e77ea4a928bcd35b18a1eb45.tar.xz |
bootm: fix possible memory leak
fdt is allocated, free it in error case.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-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 1987a09352..1ddc6d2b6e 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -167,6 +167,7 @@ static int bootm_open_oftree(struct image_data *data, const char *oftree, int nu data->of_root_node = of_unflatten_dtb(NULL, fdt); if (!data->of_root_node) { pr_err("unable to unflatten devicetree\n"); + free(fdt); return -EINVAL; } |