diff options
author | René Scharfe <l.s.r@web.de> | 2023-11-26 14:57:36 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-27 03:59:56 +0300 |
commit | cd3c28c53addae7942968f5f15854f8ce44df3ff (patch) | |
tree | f4a1c2588c13565532bb2379c76c2f506563c843 /builtin | |
parent | ec583449067bab5b800ecc63926f35c9dae96fa1 (diff) |
column: release strbuf and string_list after use
Releasing strbuf and string_list just before exiting is not strictly
necessary, but it gets rid of false positives reported by leak checkers,
which can then be more easily used to show that the column-printing
machinery behind print_columns() are free of leaks.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/column.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/column.c b/builtin/column.c index 158fdf53d9..798161bef2 100644 --- a/builtin/column.c +++ b/builtin/column.c @@ -55,5 +55,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; } |