Skip to content

Commit e5d5fe1

Browse files
committed
Merge branch 'rs/column-leakfix' into next
Leakfix. * rs/column-leakfix: column: release strbuf and string_list after use
2 parents 7d1b9df + cd3c28c commit e5d5fe1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

builtin/column.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ int cmd_column(int argc, const char **argv, const char *prefix)
5656
string_list_append(&list, sb.buf);
5757

5858
print_columns(&list, colopts, &copts);
59+
strbuf_release(&sb);
60+
string_list_clear(&list, 0);
5961
return 0;
6062
}

t/t9002-column.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
test_description='git column'
4+
TEST_PASSES_SANITIZE_LEAK=true
45
. ./test-lib.sh
56

67
test_expect_success 'setup' '

0 commit comments

Comments
 (0)