From: Alan Modra Date: Wed, 1 Mar 2023 02:18:59 +0000 (+1030) Subject: Memory leak in gas do_repeat X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0eb3224b35d94576e0498eed51373f52dee71bf1;p=binutils-gdb.git Memory leak in gas do_repeat * read.c (do_repeat): Free sb on error path. --- 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; }