mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 16:42:30 +00:00
global: clean up openssl_locks on shutdown
This commit is contained in:
parent
16288d2db3
commit
50aae0007b
@ -63,8 +63,12 @@ void openssl_locking_function(int mode, int n, const char *file, int line)
|
|||||||
git_mutex_unlock(&openssl_locks[n]);
|
git_mutex_unlock(&openssl_locks[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
static void shutdown_ssl(void)
|
||||||
|
{
|
||||||
|
git__free(openssl_locks);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void init_ssl(void)
|
static void init_ssl(void)
|
||||||
{
|
{
|
||||||
@ -112,6 +116,8 @@ static void init_ssl(void)
|
|||||||
|
|
||||||
CRYPTO_set_locking_callback(openssl_locking_function);
|
CRYPTO_set_locking_callback(openssl_locking_function);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git__on_shutdown(shutdown_ssl);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user