summaryrefslogtreecommitdiff
path: root/allocator.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-11-27 18:36:36 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2019-11-27 18:36:36 -0500
commite2bac7ba27e82cd3c249b577f363fa8c3fca0092 (patch)
tree5bfa2890a0375df09681525802cc232fa644e3eb /allocator.c
parent7c232ad8c766eef3b498900803bbbe01e865de8c (diff)
fixed problem where functions could have tuple parameters
Diffstat (limited to 'allocator.c')
-rw-r--r--allocator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/allocator.c b/allocator.c
index aeae87f..68a38cf 100644
--- a/allocator.c
+++ b/allocator.c
@@ -16,6 +16,8 @@ static void *allocr_malloc(Allocator *a, size_t bytes) {
(void)a;
return err_malloc(bytes);
#else
+ if (a == NULL)
+ return err_malloc(bytes);
/* position in this page to return */
size_t pos = PAGE_MAX_ALIGNS;
if (a->last)