diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-12-18 14:10:13 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-12-18 14:10:13 -0800 |
| commit | cacf27bf8229412ec48a572e42ba06e9c7e751a9 (patch) | |
| tree | 2a55c4cd0938d37aa1e8e3bc934930f3927f5313 | |
| parent | Merge branch 'rs/i18n-cannot-be-used-together' (diff) | |
| parent | column: release strbuf and string_list after use (diff) | |
| download | git-cacf27bf8229412ec48a572e42ba06e9c7e751a9.tar.gz git-cacf27bf8229412ec48a572e42ba06e9c7e751a9.zip | |
Merge branch 'rs/column-leakfix'
Leakfix.
* rs/column-leakfix:
column: release strbuf and string_list after use
| -rw-r--r-- | builtin/column.c | 2 | ||||
| -rwxr-xr-x | t/t9002-column.sh | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/builtin/column.c b/builtin/column.c index a83be8bc99..e80218f81f 100644 --- a/builtin/column.c +++ b/builtin/column.c @@ -56,5 +56,7 @@ int cmd_column(int argc, const char **argv, const char *prefix) string_list_append(&list, sb.buf); print_columns(&list, colopts, &copts); + strbuf_release(&sb); + string_list_clear(&list, 0); return 0; } diff --git a/t/t9002-column.sh b/t/t9002-column.sh index 6d3dbde3fe..348cc40658 100755 --- a/t/t9002-column.sh +++ b/t/t9002-column.sh @@ -1,6 +1,7 @@ #!/bin/sh test_description='git column' +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success 'setup' ' |
