From: fxcoudert Date: Thu, 11 Jan 2007 07:55:10 +0000 (+0000) Subject: PR fortran/30430 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8cadabb9ae784563784f336e32d1bf9e83823ba1;p=thirdparty%2Fgcc.git PR fortran/30430 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir only once! git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120667 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7634dcee40ee..08084303a83b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-01-11 Francois-Xavier Coudert + + PR fortran/30430 + * scanner.c (gfc_release_include_path): Free gfc_option.module_dir + only once! + 2007-01-09 Brooks Moses * simplify.c (gfc_simplify_ibclr): Fix POS comparison. diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index cf05306794d5..f7c7c8a7ec4b 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); }