diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-10-17 16:41:59 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-01 13:08:56 +0100 |
commit | 1dc763159b03cbd4387713f353f26c890d2c0e52 (patch) | |
tree | d43c18deeacd70e23d7e353c8f0c074c87419a34 /source/tools/pdfinfo.c | |
parent | f595e889b91a674eb94db7ca4d832da54f5194cd (diff) | |
download | mupdf-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/tools/pdfinfo.c')
-rw-r--r-- | source/tools/pdfinfo.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/tools/pdfinfo.c b/source/tools/pdfinfo.c index 585279b1..ba95db0c 100644 --- a/source/tools/pdfinfo.c +++ b/source/tools/pdfinfo.c @@ -1006,7 +1006,6 @@ int pdfinfo_main(int argc, char **argv) char *password = ""; int show = ALL; int c; - fz_output *out = NULL; int ret; fz_context *ctx; @@ -1037,19 +1036,11 @@ int pdfinfo_main(int argc, char **argv) exit(1); } - fz_var(out); - ret = 0; fz_try(ctx) - { - out = fz_stdout(ctx); - pdfinfo_info(ctx, out, filename, password, show, &argv[fz_optind], argc-fz_optind); - } + pdfinfo_info(ctx, fz_stdout(ctx), filename, password, show, &argv[fz_optind], argc-fz_optind); fz_catch(ctx) - { ret = 1; - } - fz_drop_output(ctx, out); fz_drop_context(ctx); return ret; } |