aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index b967061..ba388ff 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -4017,6 +4017,7 @@ gfc_free_namespace (gfc_namespace *ns)
{
gfc_namespace *p, *q;
int i;
+ gfc_was_finalized *f;
if (ns == NULL)
return;
@@ -4049,6 +4050,17 @@ gfc_free_namespace (gfc_namespace *ns)
gfc_free_interface (ns->op[i]);
gfc_free_data (ns->data);
+
+ /* Free all the expr + component combinations that have been
+ finalized. */
+ f = ns->was_finalized;
+ while (f)
+ {
+ gfc_was_finalized* current = f;
+ f = f->next;
+ free (current);
+ }
+
p = ns->contained;
free (ns);