diff options
author | djm <> | 2009-01-05 21:36:39 +0000 |
---|---|---|
committer | djm <> | 2009-01-05 21:36:39 +0000 |
commit | 13c662ccd1d22d856f1f2defeea26dd18c0af043 (patch) | |
tree | e0d2d687fbd4e4e9eb6bc4b178ea069817f0aba4 /src/lib/libcrypto/x509v3/pcy_data.c | |
parent | acc5957d1b6d6872ce50e4100edebccea0476481 (diff) | |
download | openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.tar.gz openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.tar.bz2 openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.zip |
update to openssl-0.9.8i; tested by several, especially krw@
Diffstat (limited to 'src/lib/libcrypto/x509v3/pcy_data.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/pcy_data.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/libcrypto/x509v3/pcy_data.c b/src/lib/libcrypto/x509v3/pcy_data.c index 614d2b4935..4711b1ee92 100644 --- a/src/lib/libcrypto/x509v3/pcy_data.c +++ b/src/lib/libcrypto/x509v3/pcy_data.c | |||
@@ -87,6 +87,12 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) | |||
87 | X509_POLICY_DATA *ret; | 87 | X509_POLICY_DATA *ret; |
88 | if (!policy && !id) | 88 | if (!policy && !id) |
89 | return NULL; | 89 | return NULL; |
90 | if (id) | ||
91 | { | ||
92 | id = OBJ_dup(id); | ||
93 | if (!id) | ||
94 | return NULL; | ||
95 | } | ||
90 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); | 96 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); |
91 | if (!ret) | 97 | if (!ret) |
92 | return NULL; | 98 | return NULL; |
@@ -94,6 +100,8 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) | |||
94 | if (!ret->expected_policy_set) | 100 | if (!ret->expected_policy_set) |
95 | { | 101 | { |
96 | OPENSSL_free(ret); | 102 | OPENSSL_free(ret); |
103 | if (id) | ||
104 | ASN1_OBJECT_free(id); | ||
97 | return NULL; | 105 | return NULL; |
98 | } | 106 | } |
99 | 107 | ||