Skip to content

Commit

Permalink
LibGit2: only call shutdown once [fix #28306] (#29121)
Browse files Browse the repository at this point in the history
(cherry picked from commit d8809f1)
  • Loading branch information
StefanKarpinski authored and KristofferC committed Feb 11, 2019
1 parent e2ccf56 commit 9e156b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/LibGit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e156b2

Please sign in to comment.