Commit d01fe380 by nulltoken

reset: Fix a memory leak

parent b97fabfa
......@@ -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;
......
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