From 15a611c06490183fd8a4fcf91978068256d329a5 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 27 Aug 2012 20:47:57 +0200 Subject: re PR fortran/54384 (gfortran memory leaks) 2012-08-27 Tobias Burnus 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 gfc_free_symbol instead of free. From-SVN: r190728 --- gcc/fortran/ChangeLog | 8 ++++++++ gcc/fortran/dependency.c | 2 +- gcc/fortran/trans-intrinsic.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c3e6185..d384d38 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,6 +1,14 @@ 2012-08-27 Tobias Burnus 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 + gfc_free_symbol instead of free. + +2012-08-27 Tobias Burnus + + PR fortran/54384 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss and loop. diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index ea1245d..165ab4f 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -1220,7 +1220,7 @@ check_section_vs_section (gfc_array_ref *l_ar, gfc_array_ref *r_ar, int n) else start_comparison = -2; - free (one_expr); + gfc_free_expr (one_expr); /* Determine LHS upper and lower bounds. */ if (l_dir == 1) diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 5160cf0..add4baa 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -4525,7 +4525,7 @@ conv_generic_with_optional_char_arg (gfc_se* se, gfc_expr* expr, sym = gfc_get_symbol_for_expr (expr); gfc_conv_procedure_call (se, sym, expr->value.function.actual, expr, append_args); - free (sym); + gfc_free_symbol (sym); } -- cgit v1.1