Unverified Commit 9806f5ac by Edward Thomson Committed by GitHub

Merge pull request #5999 from libgit2/ethomson/openssl_valgrind

openssl: don't fail when we can't customize allocators
parents 3f02b5b9 1903cfef
...@@ -251,13 +251,18 @@ int git_openssl_stream_global_init(void) ...@@ -251,13 +251,18 @@ int git_openssl_stream_global_init(void)
#endif #endif
#ifdef VALGRIND #ifdef VALGRIND
/* Swap in our own allocator functions that initialize allocated memory */ /*
if (!allocators_initialized && * Swap in our own allocator functions that initialize
* allocated memory to avoid spurious valgrind warnings.
* Don't error on failure; many builds of OpenSSL do not
* allow you to set these functions.
*/
if (!allocators_initialized) {
CRYPTO_set_mem_functions(git_openssl_malloc, CRYPTO_set_mem_functions(git_openssl_malloc,
git_openssl_realloc, git_openssl_realloc,
git_openssl_free) != 1) git_openssl_free);
goto error;
allocators_initialized = true; allocators_initialized = true;
}
#endif #endif
OPENSSL_init_ssl(0, NULL); OPENSSL_init_ssl(0, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment