Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/worktree.c b/worktree.c
index 62217b4a6b..62a7eb9342 100644
--- a/worktree.c
+++ b/worktree.c
@@ -357,8 +357,7 @@ int is_worktree_being_rebased(const struct worktree *wt,
state.branch &&
starts_with(target, "refs/heads/") &&
!strcmp(state.branch, target + strlen("refs/heads/")));
- free(state.branch);
- free(state.onto);
+ wt_status_state_free_buffers(&state);
return found_rebase;
}
@@ -373,7 +372,7 @@ int is_worktree_being_bisected(const struct worktree *wt,
state.branch &&
starts_with(target, "refs/heads/") &&
!strcmp(state.branch, target + strlen("refs/heads/"));
- free(state.branch);
+ wt_status_state_free_buffers(&state);
return found_rebase;
}