From 6ea45031d5841d3227c545f213d0903b951e40be Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Sun, 17 Nov 2024 15:06:44 +0100 Subject: fix(api): nvim_echo free text memory with invalid highlight (#31243) Fix regression from #31195 --- src/nvim/api/private/helpers.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 88e1664c04..8ddaecc58e 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -823,9 +823,6 @@ HlMessage parse_hl_msg(Array chunks, Error *err) int hl_id = 0; if (chunk.size == 2) { hl_id = object_to_hl_id(chunk.items[1], "text highlight", err); - if (ERROR_SET(err)) { - goto free_exit; - } } kv_push(hl_msg, ((HlMessageChunk){ .text = str, .hl_id = hl_id })); } -- cgit