summaryrefslogtreecommitdiff
path: root/lib/libcrypto/pem/pem_seal.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/pem/pem_seal.c')
-rw-r--r--lib/libcrypto/pem/pem_seal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/pem/pem_seal.c b/lib/libcrypto/pem/pem_seal.c
index a7b93792235..e6e73dd23db 100644
--- a/lib/libcrypto/pem/pem_seal.c
+++ b/lib/libcrypto/pem/pem_seal.c
@@ -113,8 +113,7 @@ PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type,
ret = npubk;
err:
- if (s != NULL)
- free(s);
+ free(s);
OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH);
return (ret);
}
@@ -182,8 +181,7 @@ PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl,
err:
EVP_MD_CTX_cleanup(&ctx->md);
EVP_CIPHER_CTX_cleanup(&ctx->cipher);
- if (s != NULL)
- free(s);
+ free(s);
return (ret);
}
#endif