Commit 26b1b15767a6e7b6401884611437ca25fe5555bb

Kirill A. Shutemov 2011-07-18T02:05:23

index: fix memory leak We need really free vectors on index freeing, not only clear. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/index.c b/src/index.c
index 2fa9c19..6390da3 100644
--- a/src/index.c
+++ b/src/index.c
@@ -196,6 +196,8 @@ void git_index_free(git_index *index)
 		return;
 
 	git_index_clear(index);
+	git_vector_free(&index->entries);
+	git_vector_free(&index->unmerged);
 
 	free(index->index_file_path);
 	free(index);