summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-11 19:44:10 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-11 21:03:12 +0200
commit4604ca430294d8d9a522dd29705e7a7a1c969304 (patch)
tree15bcf7a3a63fd7498407f04e4d12fe212636104d /source4
parent621cf3c9bf161e686935f57393ab184d298d72de (diff)
downloadsamba-4604ca430294d8d9a522dd29705e7a7a1c969304.tar.gz
samba-4604ca430294d8d9a522dd29705e7a7a1c969304.tar.bz2
samba-4604ca430294d8d9a522dd29705e7a7a1c969304.zip
Provide malloc_array() in Samba 4.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c
index b5bb75358e..5fc785d642 100644
--- a/source4/lib/util/util.c
+++ b/source4/lib/util/util.c
@@ -582,6 +582,15 @@ _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
return realloc(ptr, el_size * count);
}
+/****************************************************************************
+ Type-safe malloc.
+****************************************************************************/
+
+void *malloc_array(size_t el_size, unsigned int count)
+{
+ return realloc_array(NULL, el_size, count);
+}
+
_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
{
void *result;