diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-11-05 07:17:49 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-04 22:37:57 -0800 |
| commit | ff67083ccd77dc80002751c0f81ac50e122abd6c (patch) | |
| tree | cf5e4420cf5fd5280184afdb2544bb6f4fdf9a68 /combine-diff.c | |
| parent | dir: fix leak when parsing "status.showUntrackedFiles" (diff) | |
| download | git-ff67083ccd77dc80002751c0f81ac50e122abd6c.tar.gz git-ff67083ccd77dc80002751c0f81ac50e122abd6c.zip | |
builtin/merge: release output buffer after performing merge
The `obuf` member of `struct merge_options` is used to buffer output in
some cases. In order to not discard its allocated memory we only release
its contents in `merge_finalize()` when we're not currently recursing
into a subtree.
This results in some situations where we seemingly do not release the
buffer reliably. We thus have calls to `strbuf_release()` for this
buffer scattered across the codebase. But we're missing one callsite in
git-merge(1), which causes a memory leak.
We should ideally refactor this interface so that callers don't have to
know about any such internals. But for now, paper over the issue by
adding one more `strbuf_release()` call.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'combine-diff.c')
0 files changed, 0 insertions, 0 deletions
