diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-03-15 12:06:38 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-03-15 16:50:26 +0000 |
commit | c3c9a15b9c467d9c82b30d8263cd492b2f855928 (patch) | |
tree | f0d5c651d1767193f3d55ef6992e2efc632c87fe /source/tools | |
parent | 31b6a66e542a0eb1fa6c52fa45784458e5e247f4 (diff) | |
download | mupdf-c3c9a15b9c467d9c82b30d8263cd492b2f855928.tar.xz |
mudraw: Fix leak of fz_output in stdout case.
Diffstat (limited to 'source/tools')
-rw-r--r-- | source/tools/mudraw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 74a8724a..54363f03 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -314,11 +314,11 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) /* Open the output file (using stdout if it's given as '-'), being * careful to append if we're not the first page. */ + fz_drop_output(ctx, out); if (output && (output[0] != '-' || output[1] != 0) && *output != 0) { char text_buffer[512]; - fz_drop_output(ctx, out); fz_snprintf(text_buffer, sizeof(text_buffer), output, pagenum); out = fz_new_output_with_path(ctx, text_buffer, append); append = !has_percent_d(output); |