aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-fast-rebase.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-fast-rebase.c')
-rw-r--r--t/helper/test-fast-rebase.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index fc2d460904..993b90eaed 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -201,8 +201,6 @@ int cmd__fast_rebase(int argc, const char **argv)
}
if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
die(_("unable to update HEAD"));
- strbuf_release(&reflog_msg);
- strbuf_release(&branch_name);
prime_cache_tree(the_repository, the_repository->index,
result.tree);
@@ -221,5 +219,8 @@ int cmd__fast_rebase(int argc, const char **argv)
if (write_locked_index(&the_index, &lock,
COMMIT_LOCK | SKIP_IF_UNCHANGED))
die(_("unable to write %s"), get_index_file());
+
+ strbuf_release(&reflog_msg);
+ strbuf_release(&branch_name);
return (result.clean == 0);
}