From 0eb3224b35d94576e0498eed51373f52dee71bf1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 1 Mar 2023 12:48:59 +1030 Subject: [PATCH] Memory leak in gas do_repeat * read.c (do_repeat): Free sb on error path. --- gas/read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gas/read.c b/gas/read.c index f1099cba1a3..d43584be28c 100644 --- a/gas/read.c +++ b/gas/read.c @@ -3029,6 +3029,7 @@ do_repeat (size_t count, const char *start, const char *end, if (!buffer_and_nest (start, end, &one, get_non_macro_line_sb)) { as_bad (_("%s without %s"), start, end); + sb_kill (&one); return; } -- 2.30.2