mirror of
https://git.proxmox.com/git/libgit2
synced 2025-07-06 03:13:42 +00:00
repository: Do not double-increment refcounts
This commit is contained in:
parent
b233714360
commit
a5123ea80b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user