diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/pkcs7 | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r-- | crypto/pkcs7/pk7_doit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index 4bc06b95c2..e5ad95fb1d 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -181,8 +181,7 @@ static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri, err: EVP_PKEY_free(pkey); EVP_PKEY_CTX_free(pctx); - if (ek) - OPENSSL_free(ek); + OPENSSL_free(ek); return ret; } @@ -235,7 +234,7 @@ static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, err: EVP_PKEY_CTX_free(pctx); - if (!ret && ek) + if (!ret) OPENSSL_free(ek); return ret; @@ -890,8 +889,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si) return 1; err: - if (abuf) - OPENSSL_free(abuf); + OPENSSL_free(abuf); EVP_MD_CTX_cleanup(&mctx); return 0; |