Merge branch 'jk/leakfix'
Code clean-up. * jk/leakfix: submodule--helper: fix leak of core.worktree value config: fix leak in git_config_get_expiry_in_days() config: drop git_config_get_string_const() config: fix leaks from git_config_get_string_const() checkout: fix leak of non-existent branch names submodule--helper: use strbuf_release() to free strbufs clear_pattern_list(): clear embedded hashmaps
This commit is contained in:
2
dir.c
2
dir.c
@ -921,6 +921,8 @@ void clear_pattern_list(struct pattern_list *pl)
|
||||
free(pl->patterns[i]);
|
||||
free(pl->patterns);
|
||||
free(pl->filebuf);
|
||||
hashmap_free_entries(&pl->recursive_hashmap, struct pattern_entry, ent);
|
||||
hashmap_free_entries(&pl->parent_hashmap, struct pattern_entry, ent);
|
||||
|
||||
memset(pl, 0, sizeof(*pl));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user