From 811106028fd050cdee11fbc8732ba39f2de5e12a Mon Sep 17 00:00:00 2001 From: Phil Mellor Date: Wed, 11 Sep 2002 14:24:02 +0000 Subject: [project @ 2002-09-11 14:24:02 by monkeyson] RISC OS Wimp GUI. svn path=/import/netsurf/; revision=33 --- utils/utils.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'utils/utils.c') diff --git a/utils/utils.c b/utils/utils.c index ffdf029ae..923c16e26 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -1,5 +1,5 @@ /** - * $Id: utils.c,v 1.4 2002/06/21 18:16:24 bursa Exp $ + * $Id: utils.c,v 1.5 2002/09/11 14:24:02 monkeyson Exp $ */ #include @@ -46,6 +46,14 @@ void * xrealloc(void * p, const size_t size) return p; } +void xfree(void* p) +{ + if (p == 0) + fprintf(stderr, "Attempt to free NULL pointer\n"); + else + free(p); +} + char * xstrdup(const char * const s) { char * c = malloc(strlen(s) + 1); -- cgit v1.2.3