Skip to content

Commit 8266e0c

Browse files
avargitster
authored andcommitted
leak tests: fix a memory leak in "test-progress" helper
Fix a memory leak in the test-progress helper, and mark the corresponding "t0500-progress-display.sh" test as being leak-free under SANITIZE=leak. This fixes a leak added in 2bb74b5 (Test the progress display, 2019-09-16). My 48f6871 (tr2: stop leaking "thread_name" memory, 2021-08-27) had fixed another memory leak in this test (as it did some trace2 testing). Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eb27b33 commit 8266e0c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

t/helper/test-progress.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ int cmd__progress(int argc, const char **argv)
6969
die("invalid input: '%s'\n", line.buf);
7070
}
7171
stop_progress(&progress);
72+
strbuf_release(&line);
7273

7374
return 0;
7475
}

t/t0500-progress-display.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='progress display'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./test-lib.sh
67

78
show_cr () {

0 commit comments

Comments
 (0)