From b548a1f11c06ccdfa4f52a539912d22d77ee309e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 10:02:07 -0400 Subject: free null cleanup finale Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte --- crypto/pem/pvkfmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crypto/pem/pvkfmt.c') diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c index b44912bc50..9e9c948532 100644 --- a/crypto/pem/pvkfmt.c +++ b/crypto/pem/pvkfmt.c @@ -285,8 +285,7 @@ static EVP_PKEY *do_b2i_bio(BIO *in, int ispub) ret = b2i_rsa(&p, length, bitlen, ispub); err: - if (buf) - OPENSSL_free(buf); + OPENSSL_free(buf); return ret; } @@ -737,7 +736,7 @@ static EVP_PKEY *do_PVK_body(const unsigned char **in, ret = b2i_PrivateKey(&p, keylen); err: EVP_CIPHER_CTX_cleanup(&cctx); - if (enctmp && saltlen) + if (saltlen) OPENSSL_free(enctmp); return ret; } -- cgit v1.2.3