From 2dec14cd1dbf09755b0839859da1a942944a8376 Mon Sep 17 00:00:00 2001 From: Leo C Date: Sat, 21 Jul 2018 13:38:25 +0200 Subject: Remove xmalloc.c, fix potential 0-pointer derefenrence in cli.c. # Conflicts: # avr/cli.c --- avr/xmalloc.c | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 avr/xmalloc.c (limited to 'avr/xmalloc.c') diff --git a/avr/xmalloc.c b/avr/xmalloc.c deleted file mode 100644 index d42d5c9..0000000 --- a/avr/xmalloc.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * (C) Copyright 2014 Leo C. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include "debug.h" -#include "xmalloc.h" - -void* xmalloc(size_t size) -{ - void *p; - - p = malloc(size); - - if (p == NULL) - debug("*** Out of memory!\n"); - - return p; -} - - -void* xrealloc(void *p, size_t size) -{ - p = realloc(p, size); - - if (p == NULL) - debug("*** Out of memory!\n"); - - return p; -} -- cgit v1.2.3