diff options
author | jsing@openbsd.org <jsing@openbsd.org> | 2018-02-07 03:06:50 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-07 23:26:27 +0100 |
commit | 7cd31632e3a6607170ed0c9ed413a7ded5b9b377 (patch) | |
tree | 2acf74a8e668468768bdf9fe1b48d2289b3299bb /kexdhc.c | |
parent | Remove obsolete "Smartcard support" message (diff) | |
download | openssh-7cd31632e3a6607170ed0c9ed413a7ded5b9b377.tar.xz openssh-7cd31632e3a6607170ed0c9ed413a7ded5b9b377.zip |
upstream commit
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@
OpenBSD-Commit-ID: 954f1c51b94297d0ae1f749271e184141e0cadae
Diffstat (limited to 'kexdhc.c')
-rw-r--r-- | kexdhc.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.21 2017/12/18 02:25:15 djm Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.22 2018/02/07 02:06:51 jsing Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -203,14 +203,12 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) explicit_bzero(hash, sizeof(hash)); DH_free(kex->dh); kex->dh = NULL; - if (dh_server_pub) - BN_clear_free(dh_server_pub); + BN_clear_free(dh_server_pub); if (kbuf) { explicit_bzero(kbuf, klen); free(kbuf); } - if (shared_secret) - BN_clear_free(shared_secret); + BN_clear_free(shared_secret); sshkey_free(server_host_key); free(server_host_key_blob); free(signature); |