diff options
author | jsing@openbsd.org <jsing@openbsd.org> | 2018-02-07 02:06:50 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-08 09:26:27 +1100 |
commit | 7cd31632e3a6607170ed0c9ed413a7ded5b9b377 (patch) | |
tree | 2acf74a8e668468768bdf9fe1b48d2289b3299bb /ssh-pkcs11.c | |
parent | 3c000d57d46882eb736c6563edfc4995915c24a2 (diff) |
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 'ssh-pkcs11.c')
-rw-r--r-- | ssh-pkcs11.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index b37491c5d..65a7b5897 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-pkcs11.c,v 1.25 2017/05/31 09:15:42 deraadt Exp $ */ | 1 | /* $OpenBSD: ssh-pkcs11.c,v 1.26 2018/02/07 02:06:51 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -532,8 +532,7 @@ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx, | |||
532 | == NULL) { | 532 | == NULL) { |
533 | error("RSAPublicKey_dup"); | 533 | error("RSAPublicKey_dup"); |
534 | } | 534 | } |
535 | if (x509) | 535 | X509_free(x509); |
536 | X509_free(x509); | ||
537 | } | 536 | } |
538 | if (rsa && rsa->n && rsa->e && | 537 | if (rsa && rsa->n && rsa->e && |
539 | pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) { | 538 | pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) { |