public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Memory leak in gas do_repeat
@ 2023-03-01  3:59 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-03-01  3:59 UTC (permalink / raw)
  To: binutils

	* 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;
     }
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-01  3:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01  3:59 Memory leak in gas do_repeat Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).