From c3c9a15b9c467d9c82b30d8263cd492b2f855928 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 15 Mar 2016 12:06:38 +0000 Subject: mudraw: Fix leak of fz_output in stdout case. --- source/tools/mudraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3