Skip to content

Commit

Permalink
LibGit2: only call shutdown once [fix #28306] (#29121)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski authored Sep 11, 2018
1 parent 7142712 commit d8809f1
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 d8809f1

Please sign in to comment.