diff options
author | Ungureanu Marius <marius.ungureanu@xamarin.com> | 2014-11-15 14:35:58 +0200 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2014-11-17 14:03:15 +0100 |
commit | d6ecc311408b1042bb175aa0027b48b6224bc571 (patch) | |
tree | a6dbb20c875785f5a9992811d08e11135ad13b9c /src | |
parent | 65f6c1c7eb7beb412e30cacd5cbb2b00e1e975b0 (diff) | |
download | libgit2-d6ecc311408b1042bb175aa0027b48b6224bc571.tar.gz |
Plug possible leak in the openssl locks
Diffstat (limited to 'src')
-rw-r--r-- | src/global.c | 6 |
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 |