mirror of
https://github.com/git/git.git
synced 2026-04-06 06:50:11 +02:00
Merge branch 'rj/leakfixes'
Leakfixes * rj/leakfixes: tests: mark as passing with SANITIZE=leak config: fix a leak in git_config_copy_or_rename_section_in_file branch: fix a leak in cmd_branch branch: fix a leak in setup_tracking rev-parse: fix a leak with --abbrev-ref branch: fix a leak in setup_tracking branch: fix a leak in check_tracking_branch branch: fix a leak in inherit_tracking branch: fix a leak in dwim_and_setup_tracking remote: fix a leak in query_matches_negative_refspec config: fix a leak in git_config_copy_or_rename_section_in_file
This commit is contained in:
@@ -832,6 +832,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
if (list)
|
||||
setup_auto_pager("branch", 1);
|
||||
|
||||
UNLEAK(sorting_options);
|
||||
|
||||
if (delete) {
|
||||
if (!argc)
|
||||
die(_("branch name required"));
|
||||
|
||||
@@ -156,9 +156,12 @@ static void show_rev(int type, const struct object_id *oid, const char *name)
|
||||
*/
|
||||
break;
|
||||
case 1: /* happy */
|
||||
if (abbrev_ref)
|
||||
if (abbrev_ref) {
|
||||
char *old = full;
|
||||
full = shorten_unambiguous_ref(full,
|
||||
abbrev_ref_strict);
|
||||
free(old);
|
||||
}
|
||||
show_with_type(type, full);
|
||||
break;
|
||||
default: /* ambiguous */
|
||||
|
||||
Reference in New Issue
Block a user