From cd3c28c53addae7942968f5f15854f8ce44df3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 26 Nov 2023 12:57:36 +0100 Subject: column: release strbuf and string_list after use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/column.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin') 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; } -- cgit v1.2.3