Add freezero support

This commit is contained in:
kinichiro
2017-04-22 23:08:17 +09:00
parent 9d2418ae3a
commit 048625cf2b
6 changed files with 33 additions and 2 deletions

13
crypto/compat/freezero.c Normal file
View File

@@ -0,0 +1,13 @@
#include <string.h>
#include <stdlib.h>
void
freezero(void *ptr, size_t sz)
{
/* This is legal. */
if (ptr == NULL)
return;
explicit_bzero(ptr, sz);
free(ptr);
}