diff options
author | Alan Modra <amodra@gmail.com> | 2022-06-20 10:39:31 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-06-20 10:40:50 +0930 |
commit | 0d02e70b197c786f26175b9a73f94e01d14abdab (patch) | |
tree | c6fec4bc06ebe6249c03260b64d3e3ce9d12254a /binutils | |
parent | 8a24927bc8dbf6beac2000593b21235c3796dc35 (diff) | |
download | gdb-0d02e70b197c786f26175b9a73f94e01d14abdab.zip gdb-0d02e70b197c786f26175b9a73f94e01d14abdab.tar.gz gdb-0d02e70b197c786f26175b9a73f94e01d14abdab.tar.bz2 |
PR29262, memory leak in pr_function_type
PR 29262
* prdbg.c (pr_function_type): Free "s" on failure path.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/prdbg.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/binutils/prdbg.c b/binutils/prdbg.c index c1e4162..bb42a5b 100644 --- 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. */ |