summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pez.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pez.c b/pez.c
index 2864444..2059387 100644
--- a/pez.c
+++ b/pez.c
@@ -1935,6 +1935,7 @@ static void
deinitcomp(Comp *cm)
{
delfenv(cm->cx, &cm->fenv);
+ delvec(cm->cx, &cm->code);
delvec(cm->cx, &cm->spool);
delvec(cm->cx, &cm->kpool);
}
@@ -1958,6 +1959,8 @@ fincompfn(Comp *cm)
if (pr->upval) {
memcpy(pr->upval, cm->fenv.upvals, pr->nupval * sizeof(struct cmupval));
}
+ memset(&cm->code, 0, sizeof cm->code);
+ memset(&cm->con, 0, sizeof cm->con);
return 1;
}
@@ -2423,6 +2426,8 @@ Cleanup:
return ret && compclosure(cm, proto);
Err:
+ delvec(cm->cx, &cm->code);
+ delvec(cm->cx, &cm->con);
ret = 0;
goto Cleanup;
}