Commit 9cb99e8b853bb3d9ddec3748494a0ac34550849b

Edward Thomson 2014-03-26T12:43:41

Free temporary merge index

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/merge.c b/src/merge.c
index 42fbd79..24b7d37 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -2629,9 +2629,8 @@ int git_merge(
 on_error:
 	merge_state_cleanup(repo);
 
-	git_index_free(index_new);
-
 done:
+	git_index_free(index_new);
 	git_index_free(index_repo);
 
 	git_tree_free(ancestor_tree);