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.76 #1 (Red Hat Linux)) id 1TfbKO-0003B6-Vp for barebox@lists.infradead.org; Mon, 03 Dec 2012 19:05:17 +0000 From: Sascha Hauer Date: Mon, 3 Dec 2012 20:05:13 +0100 Message-Id: <1354561513-4025-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-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] ARM i.MX bbu: Fix wrong buffer free To: barebox@lists.infradead.org buf is still needed, instead mbr should be freed. Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/imx-bbu-internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index c34f86f..a36a427 100644 --- a/arch/arm/mach-imx/imx-bbu-internal.c +++ b/arch/arm/mach-imx/imx-bbu-internal.c @@ -72,7 +72,7 @@ static int imx_bbu_write_device(struct imx_internal_bbu_handler *imx_handler, } memcpy(buf + 0x1b8, mbr + 0x1b8, 0x48); - free(buf); + free(mbr); ret = lseek(fd, 0, SEEK_SET); if (ret) -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox