diff options
Diffstat (limited to 'usr.bin/ssh/sshbuf-misc.c')
-rw-r--r-- | usr.bin/ssh/sshbuf-misc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/ssh/sshbuf-misc.c b/usr.bin/ssh/sshbuf-misc.c index af02fe69e3f..9ece8bc64a8 100644 --- a/usr.bin/ssh/sshbuf-misc.c +++ b/usr.bin/ssh/sshbuf-misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf-misc.c,v 1.13 2020/01/25 23:28:06 djm Exp $ */ +/* $OpenBSD: sshbuf-misc.c,v 1.14 2020/02/26 13:40:09 jsg Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -152,17 +152,14 @@ sshbuf_b64tod(struct sshbuf *buf, const char *b64) if ((p = malloc(plen)) == NULL) return SSH_ERR_ALLOC_FAIL; if ((nlen = b64_pton(b64, p, plen)) < 0) { - explicit_bzero(p, plen); - free(p); + freezero(p, plen); return SSH_ERR_INVALID_FORMAT; } if ((r = sshbuf_put(buf, p, nlen)) < 0) { - explicit_bzero(p, plen); - free(p); + freezero(p, plen); return r; } - explicit_bzero(p, plen); - free(p); + freezero(p, plen); return 0; } |