The goal in this series is to pass t3200 with SANITIZE=leak. As a result of the fixes, other tests also pass. This is the list of tests that no longer trigger any leak after this series: + t1507-rev-parse-upstream.sh + t1508-at-combinations.sh + t1514-rev-parse-push.sh + t2027-checkout-track.sh + t3200-branch.sh + t3204-branch-name-interpretation.sh + t5404-tracking-branches.sh + t5517-push-mirror.sh + t5525-fetch-tagopt.sh + t6040-tracking-info.sh + t7508-status.sh Each of the commits (except 5/5) fixes a leak. They have no dependencies on each other. As a result, they can be reordered. To review one leak, the commit can be moved to the tip or reverted. E.g. to review: "branch: fix a leak in setup_tracking", this can be used: $ git revert --no-edit HEAD~3 $ make SANITIZE=leak test T=t3200-branch.sh Also, each commit have a minimal script in the message that can be used to reproduce the leak. This is the third version of this series. The refactoring in config.c has been reverted, and will be sent outside of this series. Sorry for the noise of a quick re-roll. Thanks. Rubén Justo (5): rev-parse: fix a leak with --abbrev-ref branch: fix a leak in setup_tracking branch: fix a leak in cmd_branch config: fix a leak in git_config_copy_or_rename_section_in_file tests: mark as passing with SANITIZE=leak branch.c | 2 +- builtin/branch.c | 2 ++ builtin/rev-parse.c | 5 ++++- config.c | 1 + t/t1507-rev-parse-upstream.sh | 1 + t/t1508-at-combinations.sh | 1 + t/t1514-rev-parse-push.sh | 1 + t/t2027-checkout-track.sh | 1 + t/t3200-branch.sh | 1 + t/t3204-branch-name-interpretation.sh | 1 + t/t5404-tracking-branches.sh | 1 + t/t5517-push-mirror.sh | 1 + t/t5525-fetch-tagopt.sh | 1 + t/t6040-tracking-info.sh | 1 + t/t7508-status.sh | 1 + 15 files changed, 19 insertions(+), 2 deletions(-) -- 2.40.1