summaryrefslogtreecommitdiff
path: root/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'err.c')
-rw-r--r--err.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/err.c b/err.c
index a40499e..3c2d5d5 100644
--- a/err.c
+++ b/err.c
@@ -195,6 +195,7 @@ static void warn_print_(
#define warn_print warn_print_
#endif
+
static void *err_malloc(size_t size) {
if (size == 0) return NULL;
void *ret = malloc(size);
@@ -202,6 +203,10 @@ static void *err_malloc(size_t size) {
fprintf(stderr, "Error: Out of memory.\n");
abort();
}
+
+#ifdef MALLOC_FILL
+ memset(ret, MALLOC_FILL, size);
+#endif
return ret;
}