mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
reset: Fix a memory leak
This commit is contained in:
parent
b97fabfad5
commit
d01fe38061
@ -107,8 +107,7 @@ int git_reset(
|
||||
if (reset_type > GIT_RESET_SOFT) {
|
||||
/* reset index to the target content */
|
||||
|
||||
if ((error = git_repository_index(&index, repo)) < 0 ||
|
||||
(error = git_index_read_tree(index, tree)) < 0 ||
|
||||
if ((error = git_index_read_tree(index, tree)) < 0 ||
|
||||
(error = git_index_write(index)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user