Skip to content

Fix some old memory leaks in merge-ort and builtin/merge

Elijah Newren via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2merge-ort: fix memory leak in merge_ort_internal()merge-ort.c+5 -50 replies
2/2merge: fix memory leaks in cmd_merge()builtin/merge.c+5 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix some old memory leaks in merge-ort and builtin/merge

This series fixes three memory leaks.

The first comes from a report at [1]. It's a leak in merge-ort that pre-dates the remerge-diff topic (technically traceable back 15.5 years ago across merge-recursive.c history) and is triggerable from a variety of testcases. I think I may have overlooked it previously just because there's other leaks in revision walking and this looks like one of those.

The next two leaks were ones in builtin/merge.c found while fixing the above leak; they are fixed together in the second patch.

[1] https://lore.kernel.org/git/[email protected]/

Elijah Newren (2):
merge-ort: fix memory leak in merge_ort_internal()
merge: fix memory leaks in cmd_merge()

 builtin/merge.c |  6 +++++-
 merge-ort.c     | 10 +++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

base-commit: af4e5f569bc89f356eb34a9373d7f82aca6faa8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1200%2Fnewren%2Fmerge-leaks-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1200/newren/merge-leaks-v1
Pull-Request: https://github.com/git/git/pull/1200

Signature · 1 line
gitgitgadget