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?

thanks,
>
> Cheers,
> Janus

Reply via email to