mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-05 00:51:22 +00:00
ssl: init only once without threads
The OpenSSL library-loading functions do not expect to be called multiple times. Add a flag in the non-threaded libgit2 init so we only call once. This fixes #2446.
This commit is contained in:
parent
28f087c864
commit
e6b0ae7a13
@ -291,7 +291,13 @@ static git_global_st __state;
|
||||
|
||||
int git_threads_init(void)
|
||||
{
|
||||
init_ssl();
|
||||
static int ssl_inited = 0;
|
||||
|
||||
if (!ssl_inited) {
|
||||
init_ssl();
|
||||
ssl_inited = 1;
|
||||
}
|
||||
|
||||
git_atomic_inc(&git__n_inits);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user