PR29262, memory leak in pr_function_type

PR 29262
	* prdbg.c (pr_function_type): Free "s" on failure path.
This commit is contained in:
Alan Modra 2022-06-20 10:39:31 +09:30
parent 8a24927bc8
commit 0d02e70b19

View File

@ -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. */