mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-25 19:12:56 +00:00
Fix refcount issues with mutex protected ignores
Some ignore files were not being freed from the cache.
This commit is contained in:
parent
3816debc13
commit
b87776151a
16
src/ignore.c
16
src/ignore.c
@ -204,9 +204,23 @@ int git_ignore__pop_dir(git_ignores *ign)
|
||||
|
||||
void git_ignore__free(git_ignores *ignores)
|
||||
{
|
||||
/* don't need to free ignores->ign_internal since it is in cache */
|
||||
unsigned int i;
|
||||
git_attr_file *file;
|
||||
|
||||
/* don't need to free ignores->ign_internal it is cached exactly once */
|
||||
|
||||
git_vector_foreach(&ignores->ign_path, i, file) {
|
||||
git_attr_file__free(file);
|
||||
ignores->ign_path.contents[i] = NULL;
|
||||
}
|
||||
git_vector_free(&ignores->ign_path);
|
||||
|
||||
git_vector_foreach(&ignores->ign_global, i, file) {
|
||||
git_attr_file__free(file);
|
||||
ignores->ign_global.contents[i] = NULL;
|
||||
}
|
||||
git_vector_free(&ignores->ign_global);
|
||||
|
||||
git_buf_free(&ignores->dir);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user