Commit 1b02e401 by Mikael Morin

symbol.c (free_entry_list): New function.

2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>

	* symbol.c (free_entry_list): New function.
	(gfc_free_namespace): Free list of entries.

From-SVN: r165038
parent 4f2b3d28
2010-10-06 Mikael Morin <mikael@gcc.gnu.org> 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* symbol.c (free_entry_list): New function.
(gfc_free_namespace): Free list of entries.
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* symbol.c (free_components): Free list of formal args and formal * symbol.c (free_components): Free list of formal args and formal
namespace. namespace.
......
...@@ -3255,6 +3255,22 @@ void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end) ...@@ -3255,6 +3255,22 @@ void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end)
} }
/* Free entry list structs. */
static void
free_entry_list (gfc_entry_list *el)
{
gfc_entry_list *next;
if (el == NULL)
return;
next = el->next;
gfc_free (el);
free_entry_list (next);
}
/* Free a namespace structure and everything below it. Interface /* Free a namespace structure and everything below it. Interface
lists associated with intrinsic operators are not freed. These are lists associated with intrinsic operators are not freed. These are
taken care of when a specific name is freed. */ taken care of when a specific name is freed. */
...@@ -3284,6 +3300,7 @@ gfc_free_namespace (gfc_namespace *ns) ...@@ -3284,6 +3300,7 @@ gfc_free_namespace (gfc_namespace *ns)
gfc_free_charlen (ns->cl_list, NULL); gfc_free_charlen (ns->cl_list, NULL);
free_st_labels (ns->st_labels); free_st_labels (ns->st_labels);
free_entry_list (ns->entries);
gfc_free_equiv (ns->equiv); gfc_free_equiv (ns->equiv);
gfc_free_equiv_lists (ns->equiv_lists); gfc_free_equiv_lists (ns->equiv_lists);
gfc_free_use_stmts (ns->use_stmts); gfc_free_use_stmts (ns->use_stmts);
......
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