On 5 December 2017 at 19:02, Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
> On 16 June 2010 at 14:56, Janus Weil <ja...@gcc.gnu.org> wrote:
>>>> Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>>>>
>>>
>>> OK. Kudos to Dominique for finding it and thanks, Janus, for fixing it.
>>
>> Thanks. Committed as r160834.
>
> @@ -4591,12 +4591,14 @@ gfc_check_symbol_typed (gfc_symbol* sym, 
> gfc_namespace*
> ns,
>     list and marked `error' until symbols are committed.  */
>
>  gfc_typebound_proc*
> -gfc_get_typebound_proc (void)
> +gfc_get_typebound_proc (gfc_typebound_proc *tb0)
>  {
>    gfc_typebound_proc *result;
>    tentative_tbp *list_node;
>
>    result = XCNEW (gfc_typebound_proc);
> +  if (tb0)
> +    *result = *tb0;
>    result->error = 1;
>
>    list_node = XCNEW (tentative_tbp);
>
> doesn't this leak result if tb0 != NULL ? I must be missing something?

erm, never mind. Missing deallocation of tbp is a known todo in free_tb_tree().
A memcpy would have been easier to read above..

thanks,

Reply via email to