diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/freezero.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ | |||
23 | void | 23 | void |
24 | freezero(void *ptr, size_t sz) | 24 | freezero(void *ptr, size_t sz) |
25 | { | 25 | { |
26 | if (ptr == NULL) | ||
27 | return; | ||
26 | explicit_bzero(ptr, sz); | 28 | explicit_bzero(ptr, sz); |
27 | free(ptr); | 29 | free(ptr); |
28 | } | 30 | } |