projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49954a0
)
PR29261, memory leak in parse_stab_struct_fields
author
Alan Modra
<amodra@gmail.com>
Mon, 20 Jun 2022 01:09:13 +0000
(10:39 +0930)
committer
Alan Modra
<amodra@gmail.com>
Mon, 20 Jun 2022 01:09:52 +0000
(10:39 +0930)
PR 29261
* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.
binutils/stabs.c
patch
|
blob
|
history
diff --git
a/binutils/stabs.c
b/binutils/stabs.c
index 796ff85b86a209cc61f361def48f59df29f0a41b..bf3f578cbccf01da7cba58812f359075d9b97afa 100644
(file)
--- 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;
}