Add freezero support
This commit is contained in:
13
crypto/compat/freezero.c
Normal file
13
crypto/compat/freezero.c
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user