summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 533e159..806d5df 100644
--- a/memory.c
+++ b/memory.c
@@ -271,4 +271,23 @@ dupoperator(Operator o)
threadexitsall("dupoperator");
}
return p;
+}
+
+void
+freeerrorguards(ErrorGuard *e)
+{
+ ErrorGuard *next;
+ while(e != nil){
+ next = e->next;
+ freeerrorguard(e);
+ e = next;
+ }
+}
+
+void
+freeerrorguard(ErrorGuard *e)
+{
+ if(e->active)
+ freedfnframe(e->frame, 1); /* otherwise the frame is on the dfn stack and will be free'd that way */
+ free(e);
} \ No newline at end of file