diff options
| author | joshaber <joshaber@gmail.com> | 2015-07-22 10:51:38 -0400 |
|---|---|---|
| committer | joshaber <joshaber@gmail.com> | 2015-07-22 10:51:38 -0400 |
| commit | cf198fdf2a044d2e2f0675c2c6b1cd9cdbcf4fcf (patch) | |
| tree | 378c71a9ced35d7c2506e7f75c75c72298d86eb6 /src/global.c | |
| parent | e069c621bdd62e603b048eb536f5a978a905b310 (diff) | |
| download | libgit2-cf198fdf2a044d2e2f0675c2c6b1cd9cdbcf4fcf.tar.gz | |
Increment `git__n_inits` before doing `init_once`.
Fixes #3318.
Diffstat (limited to 'src/global.c')
| -rw-r--r-- | src/global.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/global.c b/src/global.c index 3f20bfd31..cb2242405 100644 --- a/src/global.c +++ b/src/global.c @@ -330,8 +330,8 @@ int git_libgit2_init(void) { int ret; - pthread_once(&_once_init, init_once); ret = git_atomic_inc(&git__n_inits); + pthread_once(&_once_init, init_once); return init_error ? init_error : ret; } |
