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:
8a24927
)
PR29262, memory leak in pr_function_type
author
Alan Modra
<amodra@gmail.com>
Mon, 20 Jun 2022 01:09:31 +0000
(10:39 +0930)
committer
Alan Modra
<amodra@gmail.com>
Mon, 20 Jun 2022 01:10:50 +0000
(10:40 +0930)
PR 29262
* prdbg.c (pr_function_type): Free "s" on failure path.
binutils/prdbg.c
patch
|
blob
|
history
diff --git
a/binutils/prdbg.c
b/binutils/prdbg.c
index c1e41628d26d57aa0bca7469db72851d92be3b83..bb42a5b6c2d5f62ef5104ef37c2219734b4c88f8 100644
(file)
--- a/
binutils/prdbg.c
+++ b/
binutils/prdbg.c
@@
-742,12
+742,9
@@
pr_function_type (void *p, int argcount, bool varargs)
strcat (s, ")");
- if (! substitute_type (info, s))
- return false;
-
+ bool ret = substitute_type (info, s);
free (s);
-
- return true;
+ return ret;
}
/* Turn the top type on the stack into a reference to that type. */