From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOMkD-00050c-NE for barebox@lists.infradead.org; Tue, 24 Sep 2013 07:09:18 +0000 From: Sascha Hauer Date: Tue, 24 Sep 2013 09:08:37 +0200 Message-Id: <1380006527-2599-2-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1380006527-2599-1-git-send-email-s.hauer@pengutronix.de> References: <1380006527-2599-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 01/11] bootm: fix possible memory leak To: barebox@lists.infradead.org fdt is allocated, free it in error case. Signed-off-by: Sascha Hauer --- common/bootm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/bootm.c b/common/bootm.c index 1987a09..1ddc6d2 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; } -- 1.8.4.rc3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox