From f6dc2ba3c9d12be53057b9371f5109ec553a399f Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 16 Feb 2018 17:32:28 +1100 Subject: [PATCH] freezero should check for NULL. --- openbsd-compat/freezero.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openbsd-compat/freezero.c b/openbsd-compat/freezero.c index ca5de785b..90b9d3813 100644 --- a/openbsd-compat/freezero.c +++ b/openbsd-compat/freezero.c @@ -23,6 +23,8 @@ void freezero(void *ptr, size_t sz) { + if (ptr == NULL) + return; explicit_bzero(ptr, sz); free(ptr); }