summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 414b54bd7c..5b8428b546 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -5148,3 +5148,14 @@ int str_checksum(char *s)
}
return(res);
} /* str_checksum */
+
+
+
+/*****************************************************************
+zero a memory area then free it. Used to catch bugs faster
+*****************************************************************/
+void zero_free(void *p, int size)
+{
+ memset(p, 0, size);
+ free(p);
+}