From 3c2df61f635e44c1e77ea4a928bcd35b18a1eb45 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 22 Sep 2013 12:23:34 +0200 Subject: bootm: fix possible memory leak fdt is allocated, free it in error case. Signed-off-by: Sascha Hauer --- common/bootm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/bootm.c') 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; } -- cgit v1.2.3