mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 23:19:28 +00:00
repository: Properly free the index on close
This commit is contained in:
parent
62845c903e
commit
b3d94069b4
@ -315,8 +315,10 @@ void git_repository_free(git_repository *repo)
|
||||
if (repo->db != NULL)
|
||||
git_odb_close(repo->db);
|
||||
|
||||
if (repo->index != NULL)
|
||||
if (repo->index != NULL) {
|
||||
repo->index->repository = NULL;
|
||||
git_index_free(repo->index);
|
||||
}
|
||||
|
||||
free(repo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user