diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-30 11:30:03 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-30 11:31:07 -0400 |
commit | 2ace745022f5af0709297e96eb0b0829c87c4291 (patch) | |
tree | 4352672cd8681d1df32edd39443c50a98fe0b065 /crypto/asn1/x_x509a.c | |
parent | 5a80d9fbfe445420ffe6b649f29e2e0c412aba5d (diff) | |
download | openssl-2ace745022f5af0709297e96eb0b0829c87c4291.tar.gz |
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/asn1/x_x509a.c')
-rw-r--r-- | crypto/asn1/x_x509a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/x_x509a.c b/crypto/asn1/x_x509a.c index 8be50b55e2..775e46f516 100644 --- a/crypto/asn1/x_x509a.c +++ b/crypto/asn1/x_x509a.c @@ -178,7 +178,7 @@ int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj) void X509_trust_clear(X509 *x) { - if (x->aux && x->aux->trust) { + if (x->aux) { sk_ASN1_OBJECT_pop_free(x->aux->trust, ASN1_OBJECT_free); x->aux->trust = NULL; } @@ -186,7 +186,7 @@ void X509_trust_clear(X509 *x) void X509_reject_clear(X509 *x) { - if (x->aux && x->aux->reject) { + if (x->aux) { sk_ASN1_OBJECT_pop_free(x->aux->reject, ASN1_OBJECT_free); x->aux->reject = NULL; } |