diff --git a/dir.c b/dir.c index 1045cc9c6f..a684ce0186 100644 --- a/dir.c +++ b/dir.c @@ -916,6 +916,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)); }