summaryrefslogtreecommitdiffstats
path: root/builtin/column.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/column.c')
-rw-r--r--builtin/column.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/column.c b/builtin/column.c
index a83be8b..10ff7e0 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -45,6 +45,8 @@ int cmd_column(int argc, const char **argv, const char *prefix)
memset(&copts, 0, sizeof(copts));
copts.padding = 1;
argc = parse_options(argc, argv, prefix, options, builtin_column_usage, 0);
+ if (copts.padding < 0)
+ die(_("%s must be non-negative"), "--padding");
if (argc)
usage_with_options(builtin_column_usage, options);
if (real_command || command) {
@@ -56,5 +58,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;
}