2 * support/nfs/xmalloc.c
4 * malloc with NULL checking.
6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
21 if (!(ptr = malloc(size)))
22 xlog(L_FATAL, "malloc: out of memory");
27 xrealloc(void *ptr, size_t size)
29 if (!(ptr = realloc(ptr, size)))
30 xlog(L_FATAL, "realloc: out of memory");
41 xstrdup(const char *str)
45 if (!(ret = strdup(str)))
46 xlog(L_FATAL, "strdup: out of memory");