-/* $OpenBSD: apps.c,v 1.42 2017/01/21 09:29:09 deraadt Exp $ */
+/* $OpenBSD: apps.c,v 1.43 2017/04/18 02:15:50 deraadt Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
} while (ok < 0 &&
UI_ctrl(ui, UI_CTRL_IS_REDOABLE, 0, 0, 0));
- if (buff) {
- explicit_bzero(buff, (unsigned int) bufsiz);
- free(buff);
- }
+ freezero(buff, (unsigned int) bufsiz);
if (ok >= 0)
res = strlen(buf);
if (ok == -1) {
-/* $OpenBSD: dgst.c,v 1.10 2017/01/20 08:57:11 deraadt Exp $ */
+/* $OpenBSD: dgst.c,v 1.11 2017/04/18 02:15:50 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
end:
- if (buf != NULL) {
- explicit_bzero(buf, BUFSIZE);
- free(buf);
- }
+ freezero(buf, BUFSIZE);
if (in != NULL)
BIO_free(in);
free(passin);
-/* $OpenBSD: s_client.c,v 1.31 2017/01/24 09:07:40 jsing Exp $ */
+/* $OpenBSD: s_client.c,v 1.32 2017/04/18 02:15:50 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
free(pass);
if (vpm)
X509_VERIFY_PARAM_free(vpm);
- if (cbuf != NULL) {
- explicit_bzero(cbuf, BUFSIZZ);
- free(cbuf);
- }
- if (sbuf != NULL) {
- explicit_bzero(sbuf, BUFSIZZ);
- free(sbuf);
- }
- if (mbuf != NULL) {
- explicit_bzero(mbuf, BUFSIZZ);
- free(mbuf);
- }
+ freezero(cbuf, BUFSIZZ);
+ freezero(sbuf, BUFSIZZ);
+ freezero(mbuf, BUFSIZZ);
if (bio_c_out != NULL) {
BIO_free(bio_c_out);
bio_c_out = NULL;
-/* $OpenBSD: s_server.c,v 1.25 2017/01/20 08:57:12 deraadt Exp $ */
+/* $OpenBSD: s_server.c,v 1.26 2017/04/18 02:15:50 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
SSL_free(con);
}
BIO_printf(bio_s_out, "CONNECTION CLOSED\n");
- if (buf != NULL) {
- explicit_bzero(buf, bufsize);
- free(buf);
- }
+ freezero(buf, bufsize);
if (ret >= 0)
BIO_printf(bio_s_out, "ACCEPT\n");
return (ret);