summaryrefslogtreecommitdiffstats
path: root/crypto/ts/ts_rsp_sign.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
committerRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
commitc5ba2d990420e1778ca4a90bf882e0f806404af0 (patch)
tree61641d19bea624b7fa523162f0ebb0d5e2fccf55 /crypto/ts/ts_rsp_sign.c
parent33b188a8e82df57208ec8263c263f8b6f47e8255 (diff)
free NULL cleanup
EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/ts/ts_rsp_sign.c')
-rw-r--r--crypto/ts/ts_rsp_sign.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c
index b510cebde3..037ab645a2 100644
--- a/crypto/ts/ts_rsp_sign.c
+++ b/crypto/ts/ts_rsp_sign.c
@@ -216,8 +216,7 @@ int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer)
int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key)
{
- if (ctx->signer_key)
- EVP_PKEY_free(ctx->signer_key);
+ EVP_PKEY_free(ctx->signer_key);
ctx->signer_key = key;
CRYPTO_add(&ctx->signer_key->references, +1, CRYPTO_LOCK_EVP_PKEY);