mirror of
https://github.com/git/git.git
synced 2025-12-23 12:14:22 +01:00
In `shift_tree()` we allocate two empty strings that we end up passing to `match_trees()`. If that function finds a better match it will update these pointers to point to a newly allocated strings, freeing the old strings. We never free the final results though, neither the ones we have allocated ourselves, nor the one that `match_trees()` might've returned to us. Fix the resulting memory leaks by creating a common exit path where we free them. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
8.8 KiB
8.8 KiB