git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3dda65
)
added a function zero_free(void *, int size) that zeros an area of
author
Andrew Tridgell
<tridge@samba.org>
Sun, 30 Aug 1998 04:31:55 +0000
(
04:31
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 30 Aug 1998 04:31:55 +0000
(
04:31
+0000)
memory then frees it. Useful for catching bugs.
source/lib/util.c
patch
|
blob
|
history
diff --git
a/source/lib/util.c
b/source/lib/util.c
index 414b54bd7c03f46182cdac6d4dd88bdf2ba8d0ba..5b8428b546d5e7209afe42f9af67f451c89154e5 100644
(file)
--- a/
source/lib/util.c
+++ b/
source/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);
+}