aboutsummaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/node.c b/node.c
index e1b7920..ca6548b 100644
--- a/node.c
+++ b/node.c
@@ -41,3 +41,13 @@ char * str;
p->next = root;
return p;
}
+
+void free_list(n)
+node *n;
+{
+ node *tmp;
+
+ for(tmp = n; tmp; tmp = n = n->next) {
+ free(tmp);
+ }
+}