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-00050e-NK for barebox@lists.infradead.org; Tue, 24 Sep 2013 07:09:16 +0000 From: Sascha Hauer Date: Tue, 24 Sep 2013 09:08:38 +0200 Message-Id: <1380006527-2599-3-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 02/11] bootm: fix memory leak To: barebox@lists.infradead.org data->of_root_node may be allocated from of of_unflatten_dtb. Free it in this case. Signed-off-by: Sascha Hauer --- common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index 1ddc6d2..14b4cff 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -299,6 +299,8 @@ err_out: uimage_close(data->initrd); if (data->os) uimage_close(data->os); + if (data->of_root_node && data->of_root_node != of_get_root_node()) + of_delete_node(data->of_root_node); return ret; } -- 1.8.4.rc3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox