* PR29261, memory leak in parse_stab_struct_fields
@ 2022-06-20 1:50 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-06-20 1:50 UTC (permalink / raw)
To: binutils
PR 29261
* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 796ff85b86a..bf3f578cbcc 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -2367,7 +2367,10 @@ parse_stab_struct_fields (void *dhandle,
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
staticsp, p_end))
- return false;
+ {
+ free (fields);
+ return false;
+ }
++c;
}
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-20 1:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 1:50 PR29261, memory leak in parse_stab_struct_fields 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).