Commit b052cbd0 by Janus Weil

re PR fortran/45432 (gfortran.dg/allocate_alloc_opt_9.f90: Segfault due to invalid FREE)

2010-08-27  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45432
	* match.c (gfc_match_allocate): Avoid double free on error.

From-SVN: r163599
parent 7042fe5e
2010-08-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/45432
* match.c (gfc_match_allocate): Avoid double free on error.
2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32049
......
......@@ -2955,6 +2955,7 @@ alloc_opt_list:
}
stat = tmp;
tmp = NULL;
saw_stat = true;
if (gfc_check_do_variable (stat->symtree))
......@@ -2981,6 +2982,7 @@ alloc_opt_list:
}
errmsg = tmp;
tmp = NULL;
saw_errmsg = true;
if (gfc_match_char (',') == MATCH_YES)
......@@ -3019,6 +3021,7 @@ alloc_opt_list:
}
source = tmp;
tmp = NULL;
saw_source = true;
if (gfc_match_char (',') == MATCH_YES)
......@@ -3050,6 +3053,7 @@ alloc_opt_list:
}
mold = tmp;
tmp = NULL;
saw_mold = true;
mold->mold = 1;
......
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