diff options
author | 2018-02-07 02:06:50 +0000 | |
---|---|---|
committer | 2018-02-07 02:06:50 +0000 | |
commit | e7fab504cc56b1bcad841564992d71bf5f905dce (patch) | |
tree | b0d1b6c09c41af3c4dab09021a9275e15dc4a65f /usr.bin/ssh/ssh-dss.c | |
parent | remove mobileip(4) tendrils (diff) | |
download | wireguard-openbsd-e7fab504cc56b1bcad841564992d71bf5f905dce.tar.xz wireguard-openbsd-e7fab504cc56b1bcad841564992d71bf5f905dce.zip |
Remove all guards for calls to OpenSSL free functions - all of these
functions handle NULL, from at least OpenSSL 1.0.1g onwards.
Prompted by dtucker@ asking about guards for RSA_free(), when looking at
openssh-portable pr#84 on github.
ok deraadt@ dtucker@
Diffstat (limited to 'usr.bin/ssh/ssh-dss.c')
-rw-r--r-- | usr.bin/ssh/ssh-dss.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c index 6c9604b3d9e..d742dee2899 100644 --- a/usr.bin/ssh/ssh-dss.c +++ b/usr.bin/ssh/ssh-dss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-dss.c,v 1.36 2018/01/23 05:27:21 djm Exp $ */ +/* $OpenBSD: ssh-dss.c,v 1.37 2018/02/07 02:06:51 jsing Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -101,8 +101,7 @@ ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, ret = 0; out: explicit_bzero(digest, sizeof(digest)); - if (sig != NULL) - DSA_SIG_free(sig); + DSA_SIG_free(sig); sshbuf_free(b); return ret; } @@ -180,8 +179,7 @@ ssh_dss_verify(const struct sshkey *key, out: explicit_bzero(digest, sizeof(digest)); - if (sig != NULL) - DSA_SIG_free(sig); + DSA_SIG_free(sig); sshbuf_free(b); free(ktype); if (sigblob != NULL) { |