From d01fe380610da0687eecdba61369393d49830cfe Mon Sep 17 00:00:00 2001 From: nulltoken Date: Sun, 6 Jan 2013 15:26:54 +0100 Subject: [PATCH] reset: Fix a memory leak --- src/reset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reset.c b/src/reset.c index f5daa8f55..307e67260 100644 --- a/src/reset.c +++ b/src/reset.c @@ -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; -- 2.39.5