aboutsummaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-27 14:04:49 -0700
committerJunio C Hamano <gitster@pobox.com>2020-08-27 14:04:49 -0700
commit0d9a8e33f9fd07efa10072576df01a9cae5d89e6 (patch)
tree5a01c05bf4d8e6d775c4843e5c760e81be4a780b /dir.c
parentedab8a8d07eff5771ad08e7d2935f5df992c2c45 (diff)
parent55fe225dde455ae32b9bc963bef4aabb9f5f7c3e (diff)
downloadgit-0d9a8e33f9fd07efa10072576df01a9cae5d89e6.tar.gz
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
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index abb071a7a2..3018a657b0 100644
--- a/dir.c
+++ b/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));
}