Mercurial > dropbear
diff dbutil.c @ 1361:f9f930e1a516 fuzz
add dbmalloc epoch cleanup
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 21 May 2017 10:54:11 +0800 |
parents | 6b89eb92f872 |
children | ddfcadca3c4c |
line wrap: on
line diff
--- a/dbutil.c Sun May 21 10:48:18 2017 +0800 +++ b/dbutil.c Sun May 21 10:54:11 2017 +0800 @@ -520,45 +520,6 @@ } } -void * m_malloc(size_t size) { - - void* ret; - - if (size == 0) { - dropbear_exit("m_malloc failed"); - } - ret = calloc(1, size); - if (ret == NULL) { - dropbear_exit("m_malloc failed"); - } - return ret; - -} - -void * m_strdup(const char * str) { - char* ret; - - ret = strdup(str); - if (ret == NULL) { - dropbear_exit("m_strdup failed"); - } - return ret; -} - -void * m_realloc(void* ptr, size_t size) { - - void *ret; - - if (size == 0) { - dropbear_exit("m_realloc failed"); - } - ret = realloc(ptr, size); - if (ret == NULL) { - dropbear_exit("m_realloc failed"); - } - return ret; -} - void setnonblocking(int fd) { TRACE(("setnonblocking: %d", fd))