From 9194e3beb7170c7a3db7391f005e6ab0aabd180d Mon Sep 17 00:00:00 2001 From: Michael Santos Date: Thu, 28 Jan 2016 11:11:45 -0500 Subject: erts/common: check for OOM on Windows Fix the command line tools to abort on allocation failures when run on Windows. Modify the malloc() wrapper to consistently return void* across all the tools. --- erts/etc/common/inet_gethost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/etc/common/inet_gethost.c') diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c index e298c5e7f7..b27c3da9ac 100644 --- a/erts/etc/common/inet_gethost.c +++ b/erts/etc/common/inet_gethost.c @@ -2646,7 +2646,7 @@ static void *my_realloc(void *old, size_t size) BOOL create_mesq(MesQ **q) { - MesQ *tmp = malloc(sizeof(MesQ)); + MesQ *tmp = ALLOC(sizeof(MesQ)); tmp->data_present = CreateEvent(NULL, TRUE, FALSE,NULL); if (tmp->data_present == NULL) { free(tmp); -- cgit v1.2.3