summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ts
diff options
context:
space:
mode:
authormiod <>2014-07-12 16:03:37 +0000
committermiod <>2014-07-12 16:03:37 +0000
commit1ae7466a2fdd60df6484d8d132d70a044fd58c92 (patch)
treeb756e0522f06b8c8ef257885370d0ada8f818fa8 /src/lib/libcrypto/ts
parent3c4c98fca81949fb441815860d40ad66626df65d (diff)
downloadopenbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.tar.gz
openbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.tar.bz2
openbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.zip
if (x) FOO_free(x) -> FOO_free(x).
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/ts')
-rw-r--r--src/lib/libcrypto/ts/ts_rsp_sign.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_sign.c b/src/lib/libcrypto/ts/ts_rsp_sign.c
index 9d20e66f9a..27659e8f45 100644
--- a/src/lib/libcrypto/ts/ts_rsp_sign.c
+++ b/src/lib/libcrypto/ts/ts_rsp_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_rsp_sign.c,v 1.17 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: ts_rsp_sign.c,v 1.18 2014/07/12 16:03:37 miod Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -195,8 +195,7 @@ TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer)
195int 195int
196TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key) 196TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key)
197{ 197{
198 if (ctx->signer_key) 198 EVP_PKEY_free(ctx->signer_key);
199 EVP_PKEY_free(ctx->signer_key);
200 ctx->signer_key = key; 199 ctx->signer_key = key;
201 CRYPTO_add(&ctx->signer_key->references, +1, CRYPTO_LOCK_EVP_PKEY); 200 CRYPTO_add(&ctx->signer_key->references, +1, CRYPTO_LOCK_EVP_PKEY);
202 201