aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/stash.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/stash.c')
-rw-r--r--builtin/stash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index ccdfdab44b..8c90db479c 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -1047,7 +1047,6 @@ static int check_changes_tracked_files(const struct pathspec *ps)
goto done;
}
- object_array_clear(&rev.pending);
result = run_diff_files(&rev, 0);
if (diff_result_code(&rev.diffopt, result)) {
ret = 1;
@@ -1056,6 +1055,7 @@ static int check_changes_tracked_files(const struct pathspec *ps)
done:
clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
return ret;
}
@@ -1266,9 +1266,8 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
done:
discard_index(&istate);
- UNLEAK(rev);
- object_array_clear(&rev.pending);
clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
strbuf_release(&diff_output);
remove_path(stash_index_path.buf);
return ret;