MCPcopy Create free account
hub / github.com/F-Stack/f-stack / UTIL_realloc

Function UTIL_realloc

freebsd/contrib/zstd/programs/util.c:72–78  ·  view source on GitHub ↗

A modified version of realloc(). * If UTIL_realloc() fails the original block is freed. */

Source from the content-addressed store, hash-verified

70 * If UTIL_realloc() fails the original block is freed.
71 */
72UTIL_STATIC void* UTIL_realloc(void *ptr, size_t size)
73{
74 void *newptr = realloc(ptr, size);
75 if (newptr) return newptr;
76 free(ptr);
77 return NULL;
78}
79
80#if defined(_MSC_VER)
81 #define chmod _chmod

Callers 2

UTIL_prepareFileListFunction · 0.85
UTIL_createExpandedFNTFunction · 0.85

Calls 2

reallocFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected