Commit b3d94069 by Vicent Marti

repository: Properly free the index on close

parent 62845c90
...@@ -315,8 +315,10 @@ void git_repository_free(git_repository *repo) ...@@ -315,8 +315,10 @@ void git_repository_free(git_repository *repo)
if (repo->db != NULL) if (repo->db != NULL)
git_odb_close(repo->db); git_odb_close(repo->db);
if (repo->index != NULL) if (repo->index != NULL) {
repo->index->repository = NULL;
git_index_free(repo->index); git_index_free(repo->index);
}
free(repo); free(repo);
} }
......
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