Fix threading issue that at best will leak memory
authorPauli <paul.dale@oracle.com>
Fri, 3 Jun 2016 14:52:32 +0000 (10:52 -0400)
committerRich Salz <rsalz@openssl.org>
Fri, 3 Jun 2016 16:08:13 +0000 (12:08 -0400)
commit7d6df9e9150abc8e0d8f88b02159261e37eea167
tree5fa9df333cc599985bc14c6ffe62663daaf35b91
parentb38c43f7bc474c369ed652b19360ec90458be516
Fix threading issue that at best will leak memory

The problem is the checking in policy_cache_set, there is a race
condition between the null check and obtaining the lock.  The fix is in
policy_cache_new to detect if the creation has happened already.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509v3/pcy_cache.c