diff options
Diffstat (limited to 'src/haserl.c')
-rw-r--r-- | src/haserl.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/haserl.c b/src/haserl.c index 3126c41..59b38d6 100644 --- a/src/haserl.c +++ b/src/haserl.c @@ -55,6 +55,7 @@ #include "h_script.h" #include "sliding_buffer.h" #include "rfc2388.h" +#include "xmalloc.h" #ifdef INCLUDE_BASHSHELL #include "h_bash.h" #endif @@ -179,38 +180,6 @@ unescape_url (char *url) } - - -/* - * allocate memory or die, busybox style. - */ -void * -xmalloc (size_t size) -{ - void *buf; - if ((buf = malloc (size)) == NULL) - { - die_with_message (NULL, NULL, g_err_msg[E_MALLOC_FAIL]); - } - memset (buf, 0, size); - return buf; -} - - -/* - * realloc memory, or die xmalloc style. - */ -void * -xrealloc (void *buf, size_t size) -{ - if ((buf = realloc (buf, size)) == NULL) - { - die_with_message (NULL, NULL, g_err_msg[E_MALLOC_FAIL]); - } - return buf; -} - - /* * adds or replaces the "key=value" value in the env_list chain * prefix is appended to the key (e.g. FORM_key=value) |