summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/global.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/global.c b/src/global.c
index eb570c104..a7344fa91 100644
--- a/src/global.c
+++ b/src/global.c
@@ -64,7 +64,13 @@ void openssl_locking_function(int mode, int n, const char *file, int line)
static void shutdown_ssl(void)
{
+ int num_locks, i;
+
+ num_locks = CRYPTO_num_locks();
CRYPTO_set_locking_callback(NULL);
+
+ for (i = 0; i < num_locks; ++i)
+ git_mutex_free(openssl_locks);
git__free(openssl_locks);
}
#endif