summaryrefslogtreecommitdiffstats
path: root/common/Makefile
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-10-15 10:00:17 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-16 09:04:08 +0200
commitd83ae9c923b2b271ffd2a86279dad91c7713146d (patch)
tree93ddf56cfc91ceb40d452165c3cd9e09e0dec7f0 /common/Makefile
parent2c76867dce40761575f9f3e5cbf7d49e03af3de5 (diff)
downloadbarebox-d83ae9c923b2b271ffd2a86279dad91c7713146d.tar.gz
barebox-d83ae9c923b2b271ffd2a86279dad91c7713146d.tar.xz
tlsf_malloc: dummy_malloc: Share code for calloc()
Calloc() implementation for TLSF does not correctly check for malloc() failure which can result in a NULL pointer exception when trying to calloc() extra large buffers. Since both TLSF and dummy malloc implementations of calloc() are exactly the same, pick implementation for the latter (which does aforementioned check) and share it between the two. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r--common/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/Makefile b/common/Makefile
index 13920cc5a6..861365bd55 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -34,8 +34,8 @@ obj-$(CONFIG_GLOBALVAR) += globalvar.o
obj-$(CONFIG_GREGORIAN_CALENDER) += date.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_MALLOC_DLMALLOC) += dlmalloc.o
-obj-$(CONFIG_MALLOC_TLSF) += tlsf_malloc.o tlsf.o
-obj-$(CONFIG_MALLOC_DUMMY) += dummy_malloc.o
+obj-$(CONFIG_MALLOC_TLSF) += tlsf_malloc.o tlsf.o calloc.o
+obj-$(CONFIG_MALLOC_DUMMY) += dummy_malloc.o calloc.o
obj-$(CONFIG_MEMINFO) += meminfo.o
obj-$(CONFIG_MENU) += menu.o
obj-$(CONFIG_MODULES) += module.o