]> git.ipfire.org Git - thirdparty/git.git/commit - rerere.c
rerere: plug conflict ID leaks
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2015 20:03:36 +0000 (13:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jul 2015 22:08:22 +0000 (15:08 -0700)
commit8d9b5a4ada8b8e187af7dbdc7bc24f6ed774df80
tree6f052ca0461995b5a91e95f2de5b668f068b1216
parent5eda906b2873c986fa61406dafb6acd99e70d540
rerere: plug conflict ID leaks

The merge_rr string list stores the conflict ID (a hexadecimal
string that is used to index into $GIT_DIR/rr-cache) in the .util
field of its elements, and when do_plain_rerere() resolves a
conflict, the field is cleared.  Also, when rerere_forget()
recomputes the conflict ID to updates the preimage file, the
conflict ID for the path is updated.

We forgot to free the existing conflict ID when we did these two
operations.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere.c