mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 04:30:48 +00:00
Do not free the index if it's owned by a repository
Signed-off-by: Vicent Marti <tanoku@gmail.com>
This commit is contained in:
parent
48c27f86bb
commit
971c90befe
@ -166,7 +166,7 @@ int git_index_open_inrepo(git_index **index_out, git_repository *repo)
|
||||
|
||||
void git_index_free(git_index *index)
|
||||
{
|
||||
if (index == NULL)
|
||||
if (index == NULL || index->repository != NULL)
|
||||
return;
|
||||
|
||||
git_index_clear(index);
|
||||
|
Loading…
Reference in New Issue
Block a user