summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/x509v3/pcy_cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/x509v3/pcy_cache.c b/crypto/x509v3/pcy_cache.c
index e254142c0f..a9ee30a8d9 100644
--- a/crypto/x509v3/pcy_cache.c
+++ b/crypto/x509v3/pcy_cache.c
@@ -78,6 +78,9 @@ static int policy_cache_new(X509 *x)
CERTIFICATEPOLICIES *ext_cpols = NULL;
POLICY_MAPPINGS *ext_pmaps = NULL;
int i;
+
+ if (x->policy_cache != NULL)
+ return 1;
cache = OPENSSL_malloc(sizeof(*cache));
if (cache == NULL)
return 0;