aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pem/pvkfmt.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
commitb548a1f11c06ccdfa4f52a539912d22d77ee309e (patch)
tree37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/pem/pvkfmt.c
parent33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff)
downloadopenssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.gz
free null cleanup finale
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/pem/pvkfmt.c')
-rw-r--r--crypto/pem/pvkfmt.c5
1 files changed, 2 insertions, 3 deletions
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;
}