diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-20 11:16:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-20 11:16:30 -0700 |
| commit | 16c0906e8cd9b32b95dfe68058bcdaad3e4458e4 (patch) | |
| tree | 5eb2fce820151a347514e6a60c9162c10184256e /merge-ort.c | |
| parent | Merge branch 'pw/rebase-autostash-fix' (diff) | |
| parent | builtin/repack: fix leaking keep-pack list (diff) | |
| download | git-16c0906e8cd9b32b95dfe68058bcdaad3e4458e4.tar.gz git-16c0906e8cd9b32b95dfe68058bcdaad3e4458e4.zip | |
Merge branch 'ps/leakfixes-part-6'
More leakfixes.
* ps/leakfixes-part-6: (22 commits)
builtin/repack: fix leaking keep-pack list
merge-ort: fix two leaks when handling directory rename modifications
match-trees: fix leaking prefixes in `shift_tree()`
builtin/fmt-merge-msg: fix leaking buffers
builtin/grep: fix leaking object context
builtin/pack-objects: plug leaking list of keep-packs
builtin/repack: fix leaking line buffer when packing promisors
negotiator/skipping: fix leaking commit entries
shallow: fix leaking members of `struct shallow_info`
shallow: free grafts when unregistering them
object: clear grafts when clearing parsed object pool
gpg-interface: fix misdesigned signing key interfaces
send-pack: fix leaking push cert nonce
remote: fix leak in reachability check of a remote-tracking ref
remote: fix leaking tracking refs
builtin/submodule--helper: fix leaking refs on push-check
submodule: fix leaking fetch task data
upload-pack: fix leaking child process data on reachability checks
builtin/push: fix leaking refspec query result
send-pack: fix leaking common object IDs
...
Diffstat (limited to 'merge-ort.c')
| -rw-r--r-- | merge-ort.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-ort.c b/merge-ort.c index 3752c7e595..0ed3cd06b1 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -2710,7 +2710,7 @@ static void apply_directory_rename_modifications(struct merge_options *opt, struct conflict_info *dir_ci; char *cur_dir = dirs_to_insert.items[i].string; - CALLOC_ARRAY(dir_ci, 1); + dir_ci = mem_pool_calloc(&opt->priv->pool, 1, sizeof(*dir_ci)); dir_ci->merged.directory_name = parent_name; len = strlen(parent_name); @@ -2838,6 +2838,8 @@ static void apply_directory_rename_modifications(struct merge_options *opt, * Finally, record the new location. */ pair->two->path = new_path; + + string_list_clear(&dirs_to_insert, 0); } /*** Function Grouping: functions related to regular rename detection ***/ |
