Commit cc71348d by Edward Thomson Committed by Edward Thomson

global: clean up openssl_locks on shutdown

parent cb93013a
...@@ -61,8 +61,12 @@ void openssl_locking_function(int mode, int n, const char *file, int line) ...@@ -61,8 +61,12 @@ void openssl_locking_function(int mode, int n, const char *file, int line)
git_mutex_unlock(&openssl_locks[n]); git_mutex_unlock(&openssl_locks[n]);
} }
} }
#endif
static void shutdown_ssl(void)
{
git__free(openssl_locks);
}
#endif
static void init_ssl(void) static void init_ssl(void)
{ {
...@@ -110,6 +114,8 @@ static void init_ssl(void) ...@@ -110,6 +114,8 @@ static void init_ssl(void)
CRYPTO_set_locking_callback(openssl_locking_function); CRYPTO_set_locking_callback(openssl_locking_function);
} }
git__on_shutdown(shutdown_ssl);
# endif # endif
#endif #endif
} }
......
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