Commit acd17006 by Carlos Martín Nieto

remote: only keep a weak pointer in update_tips

The reference is only needed inside the function. We mistakenly
increased the reference counter causing the ODB not to get freed and
leaking descriptors.
parent 22935b06
...@@ -467,7 +467,7 @@ int git_remote_update_tips(git_remote *remote) ...@@ -467,7 +467,7 @@ int git_remote_update_tips(git_remote *remote)
if (refs->length == 0) if (refs->length == 0)
return 0; return 0;
if (git_repository_odb(&odb, remote->repo) < 0) if (git_repository_odb__weakptr(&odb, remote->repo) < 0)
return -1; return -1;
if (git_refspec__parse(&tagspec, GIT_REFSPEC_TAGS, true) < 0) if (git_refspec__parse(&tagspec, GIT_REFSPEC_TAGS, true) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment