From 9eec0812a12c0602e8a5871c452940912e26425a Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 19 Jan 1993 15:33:35 +0000 Subject: [PATCH] Improved previous fix --- lang/m2/comp/defmodule.c | 2 ++ lang/m2/comp/program.g | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/m2/comp/defmodule.c b/lang/m2/comp/defmodule.c index 400e47f62..4685360bf 100644 --- a/lang/m2/comp/defmodule.c +++ b/lang/m2/comp/defmodule.c @@ -115,6 +115,7 @@ GetDefinitionModule(id, incr) else { if (!is_anon_idf(id) && GetFile(id->id_text)) { + char *f = FileName; DefModule(); df = lookup(id, GlobalScope, D_IMPORTED, 0); if (level == 1 && @@ -135,6 +136,7 @@ GetDefinitionModule(id, incr) else Modules = n; nd_end = n; } + free(f); } else { df = lookup(id, GlobalScope, D_IMPORTED, 0); diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index 42dc9a827..96faf91e9 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -193,7 +193,6 @@ node_warning(exportlist, W_OLDFASHIONED, "export list in definition module ignor DefinitionModule--; match_id(dot.TOK_IDF, df->df_idf); df->df_flags &= ~D_BUSY; - free(FileName); } '.' ;