diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-11 05:21:11 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-18 04:50:48 +0100 |
commit | 52d7078421844b2f88329f5be3de370b0a938636 (patch) | |
tree | 1241462a841b14259755de181563cc83acd42109 /ssh-ecdsa.c | |
parent | upstream commit (diff) | |
download | openssh-52d7078421844b2f88329f5be3de370b0a938636.tar.xz openssh-52d7078421844b2f88329f5be3de370b0a938636.zip |
upstream commit
Remove NULL-checks before sshbuf_free().
ok djm@
Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
Diffstat (limited to 'ssh-ecdsa.c')
-rw-r--r-- | ssh-ecdsa.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c index 2c76f8b43..74912dfd9 100644 --- a/ssh-ecdsa.c +++ b/ssh-ecdsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-ecdsa.c,v 1.11 2014/06/24 01:13:21 djm Exp $ */ +/* $OpenBSD: ssh-ecdsa.c,v 1.12 2015/12/11 04:21:12 mmcc Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2010 Damien Miller. All rights reserved. @@ -99,10 +99,8 @@ ssh_ecdsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, ret = 0; out: explicit_bzero(digest, sizeof(digest)); - if (b != NULL) - sshbuf_free(b); - if (bb != NULL) - sshbuf_free(bb); + sshbuf_free(b); + sshbuf_free(bb); if (sig != NULL) ECDSA_SIG_free(sig); return ret; @@ -179,10 +177,8 @@ ssh_ecdsa_verify(const struct sshkey *key, out: explicit_bzero(digest, sizeof(digest)); - if (sigbuf != NULL) - sshbuf_free(sigbuf); - if (b != NULL) - sshbuf_free(b); + sshbuf_free(sigbuf); + sshbuf_free(b); if (sig != NULL) ECDSA_SIG_free(sig); free(ktype); |