Commit a5123ea8 by Vicent Marti

repository: Do not double-increment refcounts

parent b2337143
......@@ -312,7 +312,6 @@ int git_repository_odb__weakptr(git_odb **out, git_repository *repo)
GIT_REFCOUNT_OWN(repo->_odb, repo);
}
GIT_REFCOUNT_INC(repo->_odb);
*out = repo->_odb;
return GIT_SUCCESS;
}
......@@ -358,7 +357,6 @@ int git_repository_index__weakptr(git_index **out, git_repository *repo)
GIT_REFCOUNT_OWN(repo->_index, repo);
}
GIT_REFCOUNT_INC(repo->_index);
*out = repo->_index;
return GIT_SUCCESS;
}
......
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