global: clean up openssl_locks on shutdown

This commit is contained in:
Edward Thomson 2014-10-25 19:52:11 -04:00 committed by Edward Thomson
parent 16288d2db3
commit 50aae0007b

View File

@ -63,8 +63,12 @@ void openssl_locking_function(int mode, int n, const char *file, int line)
git_mutex_unlock(&openssl_locks[n]);
}
}
#endif
static void shutdown_ssl(void)
{
git__free(openssl_locks);
}
#endif
static void init_ssl(void)
{
@ -112,6 +116,8 @@ static void init_ssl(void)
CRYPTO_set_locking_callback(openssl_locking_function);
}
git__on_shutdown(shutdown_ssl);
# endif
#endif
}