From: deraadt Date: Tue, 18 Apr 2017 02:20:50 +0000 (+0000) Subject: use freezero() instead of explicit_bzero + free X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7c51e329ac47825692d714764ace4d495addc65e;p=openbsd use freezero() instead of explicit_bzero + free --- 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); }