diff options
author | 2019-11-25 00:38:17 +0000 | |
---|---|---|
committer | 2019-11-25 00:38:17 +0000 | |
commit | 11c8e95a979533158fc225af3c48baed837f102c (patch) | |
tree | d50360f01849cd67c48b0154d1f8ad5c39730fa5 /usr.bin/ssh/ssh-ecdsa-sk.c | |
parent | Only substitute patterns starting with ^ once. (diff) | |
download | wireguard-openbsd-11c8e95a979533158fc225af3c48baed837f102c.tar.xz wireguard-openbsd-11c8e95a979533158fc225af3c48baed837f102c.zip |
memleak in error path
Diffstat (limited to 'usr.bin/ssh/ssh-ecdsa-sk.c')
-rw-r--r-- | usr.bin/ssh/ssh-ecdsa-sk.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-ecdsa-sk.c b/usr.bin/ssh/ssh-ecdsa-sk.c index 1972865ec53..0b943f45ec8 100644 --- a/usr.bin/ssh/ssh-ecdsa-sk.c +++ b/usr.bin/ssh/ssh-ecdsa-sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-ecdsa-sk.c,v 1.2 2019/11/19 22:23:19 djm Exp $ */ +/* $OpenBSD: ssh-ecdsa-sk.c,v 1.3 2019/11/25 00:38:17 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2010 Damien Miller. All rights reserved. @@ -118,8 +118,10 @@ ssh_ecdsa_sk_verify(const struct sshkey *key, } /* Reconstruct data that was supposedly signed */ - if ((original_signed = sshbuf_new()) == NULL) - return SSH_ERR_ALLOC_FAIL; + if ((original_signed = sshbuf_new()) == NULL) { + ret = SSH_ERR_ALLOC_FAIL; + goto out; + } if ((ret = ssh_digest_memory(SSH_DIGEST_SHA256, data, datalen, msghash, sizeof(msghash))) != 0) goto out; |