aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chmemcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt/src/chmemcore.c')
-rw-r--r--os/rt/src/chmemcore.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/os/rt/src/chmemcore.c b/os/rt/src/chmemcore.c
index fd35fac86..95c8d2682 100644
--- a/os/rt/src/chmemcore.c
+++ b/os/rt/src/chmemcore.c
@@ -108,6 +108,7 @@ void *chCoreAlloc(size_t size) {
chSysLock();
p = chCoreAllocI(size);
chSysUnlock();
+
return p;
}
@@ -129,10 +130,12 @@ void *chCoreAllocI(size_t size) {
chDbgCheckClassI();
size = MEM_ALIGN_NEXT(size);
- if ((size_t)(endmem - nextmem) < size)
+ if ((size_t)(endmem - nextmem) < size) {
return NULL;
+ }
p = nextmem;
nextmem += size;
+
return p;
}