freezero should check for NULL.

This commit is contained in:
Darren Tucker 2018-02-16 17:32:28 +11:00
parent 680321f3eb
commit f6dc2ba3c9
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@
void
freezero(void *ptr, size_t sz)
{
if (ptr == NULL)
return;
explicit_bzero(ptr, sz);
free(ptr);
}