summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/pcy_data.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-03-24 07:52:24 -0400
committerRich Salz <rsalz@openssl.org>2015-03-24 07:52:24 -0400
commit0dfb9398bb6493d5a56216e0c7039cb3f9fc88c6 (patch)
tree9ffaa0bec3d0f14092948174eeea90dc8e2ee7c4 /crypto/x509v3/pcy_data.c
parent7c82e339a677f8546e1456c7a8f6788598a9de43 (diff)
free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove any if check before calling them. This gets ASN1_OBJECT_free and ASN1_STRING_free. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/x509v3/pcy_data.c')
-rw-r--r--crypto/x509v3/pcy_data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/x509v3/pcy_data.c b/crypto/x509v3/pcy_data.c
index 90e9970e46..3a8d4328d5 100644
--- a/crypto/x509v3/pcy_data.c
+++ b/crypto/x509v3/pcy_data.c
@@ -102,8 +102,7 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy,
ret->expected_policy_set = sk_ASN1_OBJECT_new_null();
if (!ret->expected_policy_set) {
OPENSSL_free(ret);
- if (id)
- ASN1_OBJECT_free(id);
+ ASN1_OBJECT_free(id);
return NULL;
}