aboutsummaryrefslogtreecommitdiff
path: root/crypto/compat/freezero.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crypto/compat/freezero.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/compat/freezero.c b/crypto/compat/freezero.c
new file mode 100644
index 0000000..8becc00
--- /dev/null
+++ b/crypto/compat/freezero.c
@@ -0,0 +1,13 @@
1#include <string.h>
2#include <stdlib.h>
3
4void
5freezero(void *ptr, size_t sz)
6{
7 /* This is legal. */
8 if (ptr == NULL)
9 return;
10
11 explicit_bzero(ptr, sz);
12 free(ptr);
13}