From bd94d0e645496f1bd12086310fe7a55f5bbe05cb Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 16 Feb 2022 23:26:54 -0500 Subject: [PATCH] fix: Check heap allocations --- runtime/src/runtime.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/src/runtime.c b/runtime/src/runtime.c index 0637b13..b149105 100644 --- a/runtime/src/runtime.c +++ b/runtime/src/runtime.c @@ -95,9 +95,12 @@ runtime_set_resource_limits_to_max() void runtime_initialize(void) { - runtime_worker_threads = calloc(runtime_worker_threads_count, sizeof(pthread_t)); + runtime_worker_threads = calloc(runtime_worker_threads_count, sizeof(pthread_t)); + assert(runtime_worker_threads != NULL); runtime_worker_threads_argument = calloc(runtime_worker_threads_count, sizeof(int)); + assert(runtime_worker_threads_argument != NULL); runtime_worker_threads_deadline = malloc(runtime_worker_threads_count * sizeof(uint64_t)); + assert(runtime_worker_threads_deadline != NULL); memset(runtime_worker_threads_deadline, UINT8_MAX, runtime_worker_threads_count * sizeof(uint64_t)); http_total_init();