summaryrefslogtreecommitdiff
path: root/source/gprf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-10-17 16:41:59 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-11-01 13:08:56 +0100
commit1dc763159b03cbd4387713f353f26c890d2c0e52 (patch)
treed43c18deeacd70e23d7e353c8f0c074c87419a34 /source/gprf
parentf595e889b91a674eb94db7ca4d832da54f5194cd (diff)
downloadmupdf-1dc763159b03cbd4387713f353f26c890d2c0e52.tar.xz
Add separate fz_close_output step.
Closing flushes output and may throw exceptions. Dropping frees the state and never throws exceptions.
Diffstat (limited to 'source/gprf')
-rw-r--r--source/gprf/gprf-skeleton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gprf/gprf-skeleton.c b/source/gprf/gprf-skeleton.c
index d4ad734c..f70e82a5 100644
--- a/source/gprf/gprf-skeleton.c
+++ b/source/gprf/gprf-skeleton.c
@@ -17,7 +17,6 @@ fz_save_gproof(fz_context *ctx, const char *pdf_file, fz_document *doc, const ch
fz_throw(ctx, FZ_ERROR_GENERIC, "Cannot write a 0 page GProof skeleton file");
out = fz_new_output_with_path(ctx, filename, 0);
-
fz_try(ctx)
{
/* File Signature: GPRO */
@@ -54,6 +53,8 @@ fz_save_gproof(fz_context *ctx, const char *pdf_file, fz_document *doc, const ch
fz_write_data(ctx, out, pdf_file, strlen(pdf_file)+1);
fz_write_data(ctx, out, print_profile, strlen(print_profile) + 1);
fz_write_data(ctx, out, display_profile, strlen(display_profile) + 1);
+
+ fz_close_output(ctx, out);
}
fz_always(ctx)
{