From d8809f14bff44e3dc0d25a0114bcc66af131d882 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Tue, 11 Sep 2018 15:36:25 -0400 Subject: [PATCH] LibGit2: only call shutdown once [fix #28306] (#29121) --- stdlib/LibGit2/src/LibGit2.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/LibGit2/src/LibGit2.jl b/stdlib/LibGit2/src/LibGit2.jl index 133407b9a2ac4..38175f1c3eb7b 100644 --- a/stdlib/LibGit2/src/LibGit2.jl +++ b/stdlib/LibGit2/src/LibGit2.jl @@ -978,7 +978,7 @@ end atexit() do # refcount zero, no objects to be finalized - if Threads.atomic_sub!(REFCOUNT, 1) >= 1 + if Threads.atomic_sub!(REFCOUNT, 1) == 1 ccall((:git_libgit2_shutdown, :libgit2), Cint, ()) end end