diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-09-26 13:46:43 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-27 08:25:36 -0700 |
| commit | 7f795a17154a2aeb80a7f52bfdaeef14fe298d68 (patch) | |
| tree | aeb15fa3e38d785dc4893cbc396f124c4ecc1a51 /builtin | |
| parent | dea4a9521ea134bbc12bce492b1ae467f5ff1bd1 (diff) | |
| download | git-7f795a17154a2aeb80a7f52bfdaeef14fe298d68.tar.xz | |
builtin/difftool: plug several trivial memory leaks
There are several leaking data structures in git-difftool(1). Plug them.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/difftool.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index dcc68e190c..1a68ab6699 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -660,6 +660,12 @@ finish: if (fp) fclose(fp); + hashmap_clear_and_free(&working_tree_dups, struct working_tree_entry, entry); + hashmap_clear_and_free(&wt_modified, struct path_entry, entry); + hashmap_clear_and_free(&tmp_modified, struct path_entry, entry); + hashmap_clear_and_free(&submodules, struct pair_entry, entry); + hashmap_clear_and_free(&symlinks2, struct pair_entry, entry); + release_index(&wtindex); free(lbase_dir); free(rbase_dir); strbuf_release(&info); |
