[binutils-gdb] Memory leak in gas do_repeat
Alan Modra
amodra@sourceware.org
Wed Mar 1 04:00:58 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0eb3224b35d94576e0498eed51373f52dee71bf1
commit 0eb3224b35d94576e0498eed51373f52dee71bf1
Author: Alan Modra <amodra@gmail.com>
Date: Wed Mar 1 12:48:59 2023 +1030
Memory leak in gas do_repeat
* read.c (do_repeat): Free sb on error path.
Diff:
---
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;
}
More information about the Binutils-cvs
mailing list