| commit | 0d02e70b197c786f26175b9a73f94e01d14abdab | [log] [tgz] |
|---|---|---|
| author | Alan Modra <amodra@gmail.com> | Mon Jun 20 10:39:31 2022 +0930 |
| committer | Alan Modra <amodra@gmail.com> | Mon Jun 20 10:40:50 2022 +0930 |
| tree | c6fec4bc06ebe6249c03260b64d3e3ce9d12254a | |
| parent | 8a24927bc8dbf6beac2000593b21235c3796dc35 [diff] |
PR29262, memory leak in pr_function_type PR 29262 * prdbg.c (pr_function_type): Free "s" on failure path.
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 @@ 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. */