summaryrefslogtreecommitdiff
path: root/common/malloc_simple.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-10-14 08:46:36 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-10-14 08:46:36 (GMT)
commit13a3972585af60ec367d209cedbd3601e0c77467 (patch)
tree4b3312669b3e501f6bc10b39d8c7bbf516f07aac /common/malloc_simple.c
parent208bd51396fb606dbdcf45b064e6b372d7dd3e81 (diff)
parent297faccca2235e359012118495b9b73451d54bb9 (diff)
downloadu-boot-13a3972585af60ec367d209cedbd3601e0c77467.tar.xz
Merge remote-tracking branch 'u-boot/master'
Diffstat (limited to 'common/malloc_simple.c')
-rw-r--r--common/malloc_simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index 134e059..c745863 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -32,7 +32,7 @@ void *memalign_simple(size_t align, size_t bytes)
void *ptr;
addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align);
- new_ptr = addr + bytes;
+ new_ptr = addr + bytes - gd->malloc_base;
if (new_ptr > gd->malloc_limit)
return NULL;
ptr = map_sysmem(addr, bytes);