mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-12 15:31:10 -06:00
builtin/stash: fix leak in show_stash()
We leak the `revision_args()` variable. Fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a90a089611
commit
748bd0943b
@ -975,7 +975,9 @@ static int show_stash(int argc, const char **argv, const char *prefix)
|
|||||||
log_tree_diff_flush(&rev);
|
log_tree_diff_flush(&rev);
|
||||||
|
|
||||||
ret = diff_result_code(&rev.diffopt);
|
ret = diff_result_code(&rev.diffopt);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
strvec_clear(&revision_args);
|
||||||
strvec_clear(&stash_args);
|
strvec_clear(&stash_args);
|
||||||
free_stash_info(&info);
|
free_stash_info(&info);
|
||||||
release_revisions(&rev);
|
release_revisions(&rev);
|
||||||
|
|||||||
@ -7,6 +7,7 @@ test_description='git rebase --autostash tests'
|
|||||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
test_description='Test git stash show configuration.'
|
test_description='Test git stash show configuration.'
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
test_expect_success 'setup' '
|
test_expect_success 'setup' '
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user