diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-06-29 11:46:39 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2016-07-01 17:02:33 +0200 |
commit | 453bff226796f52694f7189c141c33a996458636 (patch) | |
tree | c3805eb758fee84f6b0ac2695601646d57140ede /include/openssl/crypto.h | |
parent | 152d26461609ae36f329d6f48b2d0749e43834f3 (diff) | |
download | openssl-453bff226796f52694f7189c141c33a996458636.zip openssl-453bff226796f52694f7189c141c33a996458636.tar.gz openssl-453bff226796f52694f7189c141c33a996458636.tar.bz2 |
Make CRYPTO_num_locks() return 1
malloc(0) might return NULL and code for the old callbacks might fail,
instead just say they should allocate 1 entry.
Reviewed-by: Matt Caswell <matt@openssl.org>
GH: #1266
Diffstat (limited to 'include/openssl/crypto.h')
-rw-r--r-- | include/openssl/crypto.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 2e056c5..e9a8d53 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -215,7 +215,7 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx); * On the other hand, the locking callbacks are no longer used. Consequently, * the callback management functions can be safely replaced with no-op macros. */ -# define CRYPTO_num_locks() (0) +# define CRYPTO_num_locks() (1) # define CRYPTO_set_locking_callback(func) # define CRYPTO_get_locking_callback() (NULL) # define CRYPTO_set_add_lock_callback(func) |