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