summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2012-04-24 11:23:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-24 15:19:29 +0200
commit78312fa0c5497b089bb82e55ebe50ac6b8ce4bf9 (patch)
tree1e3db4f4058e9896eddb8c1a39274736b309b721 /common
parent60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d (diff)
downloadbarebox-78312fa0c5497b089bb82e55ebe50ac6b8ce4bf9.tar.gz
barebox-78312fa0c5497b089bb82e55ebe50ac6b8ce4bf9.tar.xz
common: memory: fix off-by-one in tlsf_create
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/memory.c b/common/memory.c
index faff33b419..3b4a5ef4b3 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -58,7 +58,7 @@ void mem_malloc_init(void *start, void *end)
malloc_end = (unsigned long)end;
malloc_brk = malloc_start;
#ifdef CONFIG_MALLOC_TLSF
- tlsf_mem_pool = tlsf_create(start, (char *)end - (char *)start);
+ tlsf_mem_pool = tlsf_create(start, end - start + 1);
#endif
}