Skip to content

Commit 17af0a8

Browse files
avargitster
authored andcommitted
submodule--helper: fix a leak with repo_clear()
Call repo_clear() in ensure_core_worktree() to free the "struct repository". Fixes a leak that's been here since 74d4731 (submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree, 2018-08-13). Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Reviewed-by: Glen Choo <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 980416e commit 17af0a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/submodule--helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,7 @@ static int ensure_core_worktree(const char *path)
23972397
strbuf_release(&sb);
23982398
}
23992399

2400+
repo_clear(&subrepo);
24002401
return 0;
24012402
}
24022403

0 commit comments

Comments
 (0)