From e698fd274cf10da403edae3c0a2e05f56e76d7c5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 Apr 2025 12:45:38 +0530 Subject: [PATCH] Release hash ambiguous parsing --- kitty/launcher/cli-parser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/launcher/cli-parser.h b/kitty/launcher/cli-parser.h index 55b7491eb..aa54aaecf 100644 --- a/kitty/launcher/cli-parser.h +++ b/kitty/launcher/cli-parser.h @@ -152,7 +152,7 @@ dest_for_alias(CLISpec *spec, const char *alias) { } } if (match_key) { - if (count == 1) return match_val; + if (count == 1) { vt_cleanup(&matches); return match_val; } total += 256 + total; char *buf = alloc_for_cli(spec, total); if (!buf) OOM; @@ -160,6 +160,7 @@ dest_for_alias(CLISpec *spec, const char *alias) { alias_map_for_loop(&matches) { n += snprintf(buf + n, total - n, " %s,", itr.data->val); } + vt_cleanup(&matches); buf[n-1] = '.'; spec->errmsg = buf; return NULL;