[PATCH 08/11] checkout: add a missing clear_unpack_trees_porcelain()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 30, 2022, 18:00 UTC
- Message-ID
- <patch-08.11-94e28aa7ab3-20220630T175714Z-avarab@gmail.com>
- In-Reply-To
- <cover-00.11-00000000000-20220630T175714Z-avarab@gmail.com>
In 1c41d2805e4 (unpack_trees_options: free messages when done, 2018-05-21) we started calling clear_unpack_trees_porcelain() on this codepath, but missed this error path, let's also clear what we've allocated in that case.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- builtin/checkout.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/builtin/checkout.c b/builtin/checkout.c index 2eefda81d8c..3d6762106e8 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -750,6 +750,7 @@ static int merge_working_tree(const struct checkout_opts *opts, refresh_cache(REFRESH_QUIET); if (unmerged_cache()) { + clear_unpack_trees_porcelain(&topts); error(_("you need to resolve your current index first")); return 1; }
-- 2.37.0.874.g7d3439f13c4