summaryrefslogtreecommitdiffstats
path: root/mandoc_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'mandoc_aux.c')
-rw-r--r--mandoc_aux.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mandoc_aux.c b/mandoc_aux.c
index 297fc199..f01e02e7 100644
--- a/mandoc_aux.c
+++ b/mandoc_aux.c
@@ -80,6 +80,18 @@ mandoc_realloc(void *ptr, size_t size)
return(ptr);
}
+void *
+mandoc_reallocarray(void *ptr, size_t num, size_t size)
+{
+
+ ptr = reallocarray(ptr, num, size);
+ if (NULL == ptr) {
+ perror(NULL);
+ exit((int)MANDOCLEVEL_SYSERR);
+ }
+ return(ptr);
+}
+
char *
mandoc_strdup(const char *ptr)
{