From ef28fcb0f59d11bdf9f574a999045bc24ca40e18 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sun, 25 Dec 2016 10:14:11 +0100 Subject: Initial --- memory.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 memory.c (limited to 'memory.c') diff --git a/memory.c b/memory.c new file mode 100644 index 0000000..6f8253f --- /dev/null +++ b/memory.c @@ -0,0 +1,11 @@ +#include +#include "memory.h" + + +void* check_after_allocation(const char *funcname, void *ptr){ + if(ptr == NULL){ + perror(funcname); + exit(1); + } + return ptr; +} -- cgit v1.2.3-70-g09d2