summary refs log tree commit diff
path: root/fold.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-08-14 21:57:27 -0700
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-08-15 22:55:08 -0700
commit3f8af2ba7b8f79bd577ca4f2fef5fb922494042d (patch)
treea24214b9ad4e601182cf75e947893c0f93367ef3 /fold.c
parent5ad8a2c6fe90554bb6ad425597be732328fe0e41 (diff)
downloadroux-3f8af2ba7b8f79bd577ca4f2fef5fb922494042d.tar.gz
specify the allocation function in vnew
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 */