aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-03-01 12:48:59 +1030
committerAlan Modra <amodra@gmail.com>2023-03-01 12:50:17 +1030
commit0eb3224b35d94576e0498eed51373f52dee71bf1 (patch)
treecad4e83c6d5fb5ae0715b7d1d422835f82662afa /gas/read.c
parent3049589885b3dd255513b32df0aa48dfcdf62f9a (diff)
downloadgdb-0eb3224b35d94576e0498eed51373f52dee71bf1.zip
gdb-0eb3224b35d94576e0498eed51373f52dee71bf1.tar.gz
gdb-0eb3224b35d94576e0498eed51373f52dee71bf1.tar.bz2
Memory leak in gas do_repeat
* read.c (do_repeat): Free sb on error path.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index f1099cb..d43584b 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;
}