From 7c51e329ac47825692d714764ace4d495addc65e Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 18 Apr 2017 02:20:50 +0000 Subject: [PATCH] use freezero() instead of explicit_bzero + free --- usr.bin/signify/signify.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index 51583267d0f..5a42802925e 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.126 2016/10/06 22:38:25 espie Exp $ */ +/* $OpenBSD: signify.c,v 1.127 2017/04/18 02:20:50 deraadt Exp $ */ /* * Copyright (c) 2013 Ted Unangst * @@ -244,8 +244,7 @@ writekeyfile(const char *filename, const char *comment, const void *buf, fd = xopen(filename, O_CREAT|oflags|O_NOFOLLOW|O_WRONLY, mode); header = createheader(comment, buf, buflen); writeall(fd, header, strlen(header), filename); - explicit_bzero(header, strlen(header)); - free(header); + freezero(header, strlen(header)); close(fd); } -- 2.20.1