From d6ecc311408b1042bb175aa0027b48b6224bc571 Mon Sep 17 00:00:00 2001 From: Ungureanu Marius Date: Sat, 15 Nov 2014 14:35:58 +0200 Subject: [PATCH] Plug possible leak in the openssl locks --- src/global.c | 6 ++++++ 1 file changed, 6 insertions(+) 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