PR29254, memory leak in stab_demangle_v3_arg

PR 29254
	* stabs.c (stab_demangle_v3_arg): Free dt on failure path.
This commit is contained in:
Alan Modra 2022-06-17 09:00:41 +09:30
parent dfea48fc0f
commit 0ebc886149

View File

@ -5467,7 +5467,10 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
dc->u.s_binary.right,
&varargs);
if (pargs == NULL)
return NULL;
{
free (dt);
return NULL;
}
return debug_make_function_type (dhandle, dt, pargs, varargs);
}