summaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-10-04 11:23:58 +0100
committerColin Watson <cjwatson@debian.org>2017-10-05 23:58:12 +0100
commit0556ea972b15607b7e13ff31bc05840881c91dd3 (patch)
treed6b8d48062d0278b5ae0eeff42d0e9afa9f26860 /xmalloc.c
parentdb2122d97eb1ecdd8d99b7bf79b0dd2b5addfd92 (diff)
parent801a62eedaaf47b20dbf4b426dc3e084bf0c8d49 (diff)
New upstream release (7.6p1)
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xmalloc.c b/xmalloc.c
index b58323677..5cc0310a4 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: xmalloc.c,v 1.33 2016/02/15 09:47:49 dtucker Exp $ */ 1/* $OpenBSD: xmalloc.c,v 1.34 2017/05/31 09:15:42 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -77,6 +77,18 @@ xreallocarray(void *ptr, size_t nmemb, size_t size)
77 return new_ptr; 77 return new_ptr;
78} 78}
79 79
80void *
81xrecallocarray(void *ptr, size_t onmemb, size_t nmemb, size_t size)
82{
83 void *new_ptr;
84
85 new_ptr = recallocarray(ptr, onmemb, nmemb, size);
86 if (new_ptr == NULL)
87 fatal("xrecallocarray: out of memory (%zu elements of %zu bytes)",
88 nmemb, size);
89 return new_ptr;
90}
91
80char * 92char *
81xstrdup(const char *str) 93xstrdup(const char *str)
82{ 94{