summary refs log tree commit diff
path: root/fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'fold.c')
-rw-r--r--fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fold.c b/fold.c
index da566ab..c2a7c12 100644
--- a/fold.c
+++ b/fold.c
@@ -193,7 +193,7 @@ fold(Fn *fn)
 
 	val = emalloc(fn->ntmp * sizeof val[0]);
 	edge = emalloc(fn->nblk * sizeof edge[0]);
-	usewrk = vnew(0, sizeof usewrk[0]);
+	usewrk = vnew(0, sizeof usewrk[0], emalloc);
 
 	for (n=0; n<fn->ntmp; n++)
 		val[n] = Top;
@@ -314,6 +314,7 @@ fold(Fn *fn)
 
 	free(val);
 	free(edge);
+	vfree(usewrk);
 }
 
 /* boring folding code */