summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-11-17 14:03:50 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-17 14:03:50 +0100
commit8aa707376a4e9dc2b086569f3720901cfef83841 (patch)
tree790b5a9e34d828293d428451d8018e69d5e8f4f1
parentce8822cb409917d0201f359cabe3ae55d25895da (diff)
parentd6ecc311408b1042bb175aa0027b48b6224bc571 (diff)
downloadlibgit2-8aa707376a4e9dc2b086569f3720901cfef83841.tar.gz
Merge branch 'openssl-lock-free'
-rw-r--r--src/global.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/global.c b/src/global.c
index da903cb94..006202a2c 100644
--- a/src/global.c
+++ b/src/global.c
@@ -67,7 +67,13 @@ void openssl_locking_function(int mode, int n, const char *file, int line)
static void shutdown_ssl_locking(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