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/dh.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/dh.c')
-rw-r--r-- | usr.bin/ssh/dh.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c index 095f93b6c92..74b4135d4af 100644 --- a/usr.bin/ssh/dh.c +++ b/usr.bin/ssh/dh.c @@ -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. * @@ -131,10 +131,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; } |