receive-pack: release the linked "struct command *" list

Fix a memory leak that's been with us since this code was introduced
in [1]. Later in [2] we started using FLEX_ALLOC_MEM() to allocate the
"struct command *".

1. 575f497456 (Add first cut at "git-receive-pack", 2005-06-29)
2. eb1af2df0b (git-receive-pack: start parsing ref update commands,
   2005-06-29)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2023-02-07 00:07:52 +01:00
committed by Junio C Hamano
parent fb2ebe72a3
commit 1fdd31cf52
10 changed files with 22 additions and 0 deletions

View File

@ -2,6 +2,7 @@
test_description='remote push rejects are reported by client'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '