diff options
| author | djm <> | 2009-01-05 21:36:39 +0000 |
|---|---|---|
| committer | djm <> | 2009-01-05 21:36:39 +0000 |
| commit | 3be551b5922b665fd4e18cd65b857b9f92a0b6c8 (patch) | |
| tree | e0d2d687fbd4e4e9eb6bc4b178ea069817f0aba4 /src/lib/libcrypto/x509v3/pcy_data.c | |
| parent | 822633f8798a6b4646a8b092e7c67f511cdbdba2 (diff) | |
| download | openbsd-3be551b5922b665fd4e18cd65b857b9f92a0b6c8.tar.gz openbsd-3be551b5922b665fd4e18cd65b857b9f92a0b6c8.tar.bz2 openbsd-3be551b5922b665fd4e18cd65b857b9f92a0b6c8.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 | ||
