diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-30 17:30:03 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-30 17:31:07 +0200 |
commit | 2ace745022f5af0709297e96eb0b0829c87c4291 (patch) | |
tree | 4352672cd8681d1df32edd39443c50a98fe0b065 /crypto/ts/ts_rsp_sign.c | |
parent | Fix bug, "what mode" test was wrong. (diff) | |
download | openssl-2ace745022f5af0709297e96eb0b0829c87c4291.tar.xz openssl-2ace745022f5af0709297e96eb0b0829c87c4291.zip |
free NULL cleanup 8
Do not check for NULL before calling a free routine. This addresses:
ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free
ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free
ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free
ASN1_UTCTIME_free M_ASN1_free_of
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ts/ts_rsp_sign.c')
-rw-r--r-- | crypto/ts/ts_rsp_sign.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c index a8d683bafc..0cdeb068c6 100644 --- a/crypto/ts/ts_rsp_sign.c +++ b/crypto/ts/ts_rsp_sign.c @@ -225,8 +225,7 @@ int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key) int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *def_policy) { - if (ctx->default_policy) - ASN1_OBJECT_free(ctx->default_policy); + ASN1_OBJECT_free(ctx->default_policy); if (!(ctx->default_policy = OBJ_dup(def_policy))) goto err; return 1; |