summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e58f5274df..4452de8b4b 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -937,6 +937,19 @@ void *Realloc(void *p,size_t size)
return(ret);
}
+void *Realloc_zero(void *ptr, size_t size)
+{
+ void *tptr = NULL;
+
+ tptr = Realloc(ptr, size);
+ if(tptr == NULL)
+ return NULL;
+
+ memset((char *)tptr,'\0',size);
+
+ return tptr;
+}
+
/****************************************************************************
Free memory, checks for NULL.
Use directly SAFE_FREE()