aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2007-01-11 08:55:10 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-01-11 07:55:10 +0000
commit1bc2338361af6fb1e8fecb3ec44db9979d842e4d (patch)
tree4ca483067aa60870ae6213ec655e79782a93324e /gcc
parent50ef2c18a91c06d941997b642afa1eb35168ea33 (diff)
downloadgcc-1bc2338361af6fb1e8fecb3ec44db9979d842e4d.zip
gcc-1bc2338361af6fb1e8fecb3ec44db9979d842e4d.tar.gz
gcc-1bc2338361af6fb1e8fecb3ec44db9979d842e4d.tar.bz2
re PR fortran/30430 (Memory corruption in the module search path code)
PR fortran/30430 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir only once! From-SVN: r120667
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/scanner.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 7634dce..0808430 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR fortran/30430
+ * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
+ only once!
+
2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
* simplify.c (gfc_simplify_ibclr): Fix POS comparison.
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index cf05306..f7c7c8a 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -172,7 +172,6 @@ gfc_release_include_path (void)
{
gfc_directorylist *p;
- gfc_free (gfc_option.module_dir);
while (include_dirs != NULL)
{
p = include_dirs;
@@ -181,7 +180,6 @@ gfc_release_include_path (void)
gfc_free (p);
}
- gfc_free (gfc_option.module_dir);
while (intrinsic_modules_dirs != NULL)
{
p = intrinsic_modules_dirs;
@@ -189,6 +187,8 @@ gfc_release_include_path (void)
gfc_free (p->path);
gfc_free (p);
}
+
+ gfc_free (gfc_option.module_dir);
}