diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-07 02:06:52 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-07 02:06:52 +0000 |
commit | 2c11ce7ea02f220e9e02240e5b614351e93c57eb (patch) | |
tree | 2ff45516938218fe047284d2cdd430fb6bf21cdb /usr.bin/ssh/kex.c | |
parent | 6891e6331a0438c7bdef737c2253daff9080adc1 (diff) |
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/kex.c')
-rw-r--r-- | usr.bin/ssh/kex.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c index f88fefcd2c3..44723db11e4 100644 --- a/usr.bin/ssh/kex.c +++ b/usr.bin/ssh/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.135 2018/01/23 05:27:21 djm Exp $ */ +/* $OpenBSD: kex.c,v 1.136 2018/02/07 02:06:50 jsing Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -575,10 +575,8 @@ kex_free(struct kex *kex) u_int mode; #ifdef WITH_OPENSSL - if (kex->dh) - DH_free(kex->dh); - if (kex->ec_client_key) - EC_KEY_free(kex->ec_client_key); + DH_free(kex->dh); + EC_KEY_free(kex->ec_client_key); #endif for (mode = 0; mode < MODE_MAX; mode++) { kex_free_newkeys(kex->newkeys[mode]); |