MCPcopy Create free account
hub / github.com/commonmark/cmark / xrealloc

Function xrealloc

src/cmark.c:22–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22static void *xrealloc(void *ptr, size_t size) {
23 void *new_ptr = realloc(ptr, size);
24 if (!new_ptr) {
25 fprintf(stderr, "[cmark] realloc returned null pointer, aborting\n");
26 abort();
27 }
28 return new_ptr;
29}
30
31cmark_mem DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, free};
32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected