Loading crypto/bio/b_addr.c +2 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ #include <openssl/buffer.h> #include <ctype.h> static CRYPTO_RWLOCK *bio_lookup_lock; CRYPTO_RWLOCK *bio_lookup_lock; static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT; /* Loading Loading @@ -891,4 +891,5 @@ int BIO_lookup(const char *host, const char *service, return ret; } #endif /* OPENSSL_NO_SOCK */ crypto/bio/bio_lcl.h +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ struct bio_st { typedef unsigned int socklen_t; # endif extern CRYPTO_RWLOCK *bio_lookup_lock; int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa); const struct sockaddr *BIO_ADDR_sockaddr(const BIO_ADDR *ap); struct sockaddr *BIO_ADDR_sockaddr_noconst(BIO_ADDR *ap); Loading @@ -135,6 +137,8 @@ socklen_t BIO_ADDRINFO_sockaddr_size(const BIO_ADDRINFO *bai); const struct sockaddr *BIO_ADDRINFO_sockaddr(const BIO_ADDRINFO *bai); #endif void bio_sock_cleanup_int(void); #if BIO_FLAGS_UPLINK==0 /* Shortcut UPLINK calls on most platforms... */ # define UP_stdin stdin Loading crypto/bio/bio_lib.c +10 −0 Original line number Diff line number Diff line Loading @@ -644,3 +644,13 @@ uint64_t BIO_number_written(BIO *bio) return bio->num_write; return 0; } void bio_cleanup(void) { #ifndef OPENSSL_NO_SOCK bio_sock_cleanup_int(); CRYPTO_THREAD_lock_free(bio_lookup_lock); bio_lookup_lock = NULL; #endif } crypto/err/err.c +7 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ #include <string.h> #include <internal/cryptlib_int.h> #include <internal/threads.h> #include <internal/err.h> #include <openssl/lhash.h> #include <openssl/crypto.h> #include <openssl/buffer.h> Loading Loading @@ -389,9 +390,13 @@ static void ERR_STATE_free(ERR_STATE *s) static void do_err_strings_init(void) { CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); err_string_lock = CRYPTO_THREAD_lock_new(); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE); } void err_cleanup(void) { CRYPTO_THREAD_lock_free(err_string_lock); err_string_lock = NULL; } void ERR_load_ERR_strings(void) Loading crypto/ex_data.c +7 −3 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ * */ #include "internal/cryptlib.h" #include "internal/cryptlib_int.h" #include "internal/threads.h" #include <openssl/lhash.h> Loading Loading @@ -139,9 +139,13 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; static void do_ex_data_init(void) { CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); ex_data_lock = CRYPTO_THREAD_lock_new(); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE); } void ex_data_cleanup(void) { CRYPTO_THREAD_lock_free(ex_data_lock); ex_data_lock = NULL; } /* Loading Loading
crypto/bio/b_addr.c +2 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ #include <openssl/buffer.h> #include <ctype.h> static CRYPTO_RWLOCK *bio_lookup_lock; CRYPTO_RWLOCK *bio_lookup_lock; static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT; /* Loading Loading @@ -891,4 +891,5 @@ int BIO_lookup(const char *host, const char *service, return ret; } #endif /* OPENSSL_NO_SOCK */
crypto/bio/bio_lcl.h +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ struct bio_st { typedef unsigned int socklen_t; # endif extern CRYPTO_RWLOCK *bio_lookup_lock; int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa); const struct sockaddr *BIO_ADDR_sockaddr(const BIO_ADDR *ap); struct sockaddr *BIO_ADDR_sockaddr_noconst(BIO_ADDR *ap); Loading @@ -135,6 +137,8 @@ socklen_t BIO_ADDRINFO_sockaddr_size(const BIO_ADDRINFO *bai); const struct sockaddr *BIO_ADDRINFO_sockaddr(const BIO_ADDRINFO *bai); #endif void bio_sock_cleanup_int(void); #if BIO_FLAGS_UPLINK==0 /* Shortcut UPLINK calls on most platforms... */ # define UP_stdin stdin Loading
crypto/bio/bio_lib.c +10 −0 Original line number Diff line number Diff line Loading @@ -644,3 +644,13 @@ uint64_t BIO_number_written(BIO *bio) return bio->num_write; return 0; } void bio_cleanup(void) { #ifndef OPENSSL_NO_SOCK bio_sock_cleanup_int(); CRYPTO_THREAD_lock_free(bio_lookup_lock); bio_lookup_lock = NULL; #endif }
crypto/err/err.c +7 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ #include <string.h> #include <internal/cryptlib_int.h> #include <internal/threads.h> #include <internal/err.h> #include <openssl/lhash.h> #include <openssl/crypto.h> #include <openssl/buffer.h> Loading Loading @@ -389,9 +390,13 @@ static void ERR_STATE_free(ERR_STATE *s) static void do_err_strings_init(void) { CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); err_string_lock = CRYPTO_THREAD_lock_new(); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE); } void err_cleanup(void) { CRYPTO_THREAD_lock_free(err_string_lock); err_string_lock = NULL; } void ERR_load_ERR_strings(void) Loading
crypto/ex_data.c +7 −3 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ * */ #include "internal/cryptlib.h" #include "internal/cryptlib_int.h" #include "internal/threads.h" #include <openssl/lhash.h> Loading Loading @@ -139,9 +139,13 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; static void do_ex_data_init(void) { CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); ex_data_lock = CRYPTO_THREAD_lock_new(); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE); } void ex_data_cleanup(void) { CRYPTO_THREAD_lock_free(ex_data_lock); ex_data_lock = NULL; } /* Loading