You need to sign in or sign up before continuing.
Commit 696222ce authored by Stas Korobeynikov's avatar Stas Korobeynikov Committed by Pavel Vainerman

add old openssh fuction xfree

parent 9702c816
...@@ -49,6 +49,14 @@ xmalloc(size_t size) ...@@ -49,6 +49,14 @@ xmalloc(size_t size)
return ptr; return ptr;
} }
void
xfree(void *ptr)
{
if (ptr == NULL)
fatal("xfree: NULL pointer given as argument");
free(ptr);
}
void * void *
xcalloc(size_t nmemb, size_t size) xcalloc(size_t nmemb, size_t size)
{ {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
void ssh_malloc_init(void); void ssh_malloc_init(void);
void *xmalloc(size_t); void *xmalloc(size_t);
void xfree(void *);
void *xcalloc(size_t, size_t); void *xcalloc(size_t, size_t);
void *xreallocarray(void *, size_t, size_t); void *xreallocarray(void *, size_t, size_t);
char *xstrdup(const char *); char *xstrdup(const char *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment