]> Kevux Git Server - rit/commit
merge-recursive: fix leaking rename conflict info
authorPatrick Steinhardt <ps@pks.im>
Tue, 11 Jun 2024 09:19:40 +0000 (11:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Jun 2024 20:15:05 +0000 (13:15 -0700)
commit3d31d382557527bf945a088931e3e28a717cc547
tree434ef0510e1674429beecd9b87274b0a3083ed50
parentafb0653d2373dc72ad4a9c89b7d17b660d194f04
merge-recursive: fix leaking rename conflict info

When computing rename conflicts in our recursive merge algorithm we set
up `struct rename_conflict_info`s to track that information. We never
free those data structures though and thus leak memory.

We need to be a bit more careful here though because the same rename
conflict info can be assigned to multiple structures. Accommodate for
this by introducing a `rename_conflict_info_owned` bit that we can use
to steer whether or not the rename conflict info shall be free'd.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
t/t3401-rebase-and-am-rename.sh
t/t4153-am-resume-override-opts.sh
t/t7201-co.sh