Commit 50aae000 by Edward Thomson Committed by Edward Thomson

global: clean up openssl_locks on shutdown

parent 16288d2d
...@@ -63,8 +63,12 @@ void openssl_locking_function(int mode, int n, const char *file, int line) ...@@ -63,8 +63,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)
{ {
...@@ -112,6 +116,8 @@ static void init_ssl(void) ...@@ -112,6 +116,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