File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -251,13 +251,18 @@ int git_openssl_stream_global_init(void)
251251#endif
252252
253253#ifdef VALGRIND
254- /* Swap in our own allocator functions that initialize allocated memory */
255- if (!allocators_initialized &&
254+ /*
255+ * Swap in our own allocator functions that initialize
256+ * allocated memory to avoid spurious valgrind warnings.
257+ * Don't error on failure; many builds of OpenSSL do not
258+ * allow you to set these functions.
259+ */
260+ if (!allocators_initialized ) {
256261 CRYPTO_set_mem_functions (git_openssl_malloc ,
257262 git_openssl_realloc ,
258- git_openssl_free ) != 1 )
259- goto error ;
260- allocators_initialized = true;
263+ git_openssl_free );
264+ allocators_initialized = true ;
265+ }
261266#endif
262267
263268 OPENSSL_init_ssl (0 , NULL );
You can’t perform that action at this time.
0 commit comments