Commit d7920cf0 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/54384 (gfortran memory leaks)

2012-08-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54384
        * resolve.c (gfc_resolve_character_operator): Free temporary
        variables.
        * trans-expr.c (gfc_conv_statement_function): Ditto.

From-SVN: r190731
parent 655c5444
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* resolve.c (gfc_resolve_character_operator): Free temporary
variables.
* trans-expr.c (gfc_conv_statement_function): Ditto.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* dependency.c (check_section_vs_section): Use gfc_free_expr
instead of free.
* trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
......
......@@ -5593,7 +5593,12 @@ gfc_resolve_character_operator (gfc_expr *e)
e->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
if (!e1 || !e2)
return;
{
gfc_free_expr (e1);
gfc_free_expr (e2);
return;
}
e->ts.u.cl->length = gfc_add (e1, e2);
e->ts.u.cl->length->ts.type = BT_INTEGER;
......
......@@ -5080,6 +5080,7 @@ gfc_conv_statement_function (gfc_se * se, gfc_expr * expr)
/* Restore the original variables. */
for (fargs = sym->formal, n = 0; fargs; fargs = fargs->next, n++)
gfc_restore_sym (fargs->sym, &saved_vars[n]);
free (temp_vars);
free (saved_vars);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment