mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM i.MX bbu: Fix wrong buffer free
@ 2012-12-03 19:05 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2012-12-03 19:05 UTC (permalink / raw)
  To: barebox

buf is still needed, instead mbr should be freed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-03 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03 19:05 [PATCH] ARM i.MX bbu: Fix wrong buffer free Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox