diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-14 21:28:54 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-14 22:15:32 +0100 |
commit | 1ee7b8b97c90e8e59627bfcbda3714f18368a9e1 (patch) | |
tree | 53a54a29d27fbdde8625fbfce8d230255a5fc020 /crypto/bio | |
parent | 6e08e9e7ccf00aba847351adc3b46b9dae1f114d (diff) | |
download | openssl-1ee7b8b97c90e8e59627bfcbda3714f18368a9e1.tar.gz |
Fix ex_data locks issue
Travis identified a problem with freeing the ex_data locks which wasn't
quite right in ff2344052. Trying to fix it identified a further problem:
the ex_data locks are cleaned up by OPENSSL_cleanup(), which is called
explicitly by CRYPTO_mem_leaks(), but then later the BIO passed to
CRYPTO_mem_leaks() is freed. An attempt is then made to use the ex_data
lock already freed.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bio_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c index 025869454f..94c97da369 100644 --- a/crypto/bio/bio_lib.c +++ b/crypto/bio/bio_lib.c @@ -645,6 +645,10 @@ uint64_t BIO_number_written(BIO *bio) return 0; } +void bio_free_ex_data(BIO *bio) +{ + CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data); +} void bio_cleanup(void) { |