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 /dh.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 'dh.c')
-rw-r--r-- | dh.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */ +/* $OpenBSD: dh.c,v 1.63 2018/02/07 02:06:50 jsing Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -135,10 +135,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg) return 1; fail: - if (dhg->g != NULL) - BN_clear_free(dhg->g); - if (dhg->p != NULL) - BN_clear_free(dhg->p); + BN_clear_free(dhg->g); + BN_clear_free(dhg->p); dhg->g = dhg->p = NULL; return 0; } |