aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-08-27 20:47:57 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-08-27 20:47:57 +0200
commit15a611c06490183fd8a4fcf91978068256d329a5 (patch)
tree22f012d48f6c04513605c4713a81cd78796adca3
parent4b3fa92c24ca9d75140a50cbddacee9ed0b1adfa (diff)
downloadgcc-15a611c06490183fd8a4fcf91978068256d329a5.zip
gcc-15a611c06490183fd8a4fcf91978068256d329a5.tar.gz
gcc-15a611c06490183fd8a4fcf91978068256d329a5.tar.bz2
re PR fortran/54384 (gfortran memory leaks)
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 gfc_free_symbol instead of free. From-SVN: r190728
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/fortran/dependency.c2
-rw-r--r--gcc/fortran/trans-intrinsic.c2
3 files changed, 10 insertions, 2 deletions
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 <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
+ gfc_free_symbol instead of free.
+
+2012-08-27 Tobias Burnus <burnus@net-b.de>
+
+ 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);
}