summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 7d74376e..26f6149e 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -850,6 +850,8 @@ fun p_exp' par env (e, loc) =
string "uw_end_region(ctx);",
newline,
+ string "uw_push_cleanup(ctx, (void (*)(void *))PQclear, res);",
+ newline,
string "n = PQntuples(res);",
newline,
string "for (i = 0; i < n; ++i) {",
@@ -906,7 +908,7 @@ fun p_exp' par env (e, loc) =
string "}",
newline,
newline,
- string "PQclear(res);",
+ string "uw_pop_cleanup(ctx);",
newline,
if wontLeakAnything then
box [string "uw_end_region(ctx);",