From a8603881a80ca25a0943cc4aecb5f09af1a45428 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 4 Jan 2024 10:35:11 +0000 Subject: [PATCH] Close files properly --- cpdfimage.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpdfimage.ml b/cpdfimage.ml index c077f64..28b5e47 100644 --- a/cpdfimage.ml +++ b/cpdfimage.ml @@ -525,7 +525,8 @@ let jpeg_to_jpeg pdf ~pixel_threshold ~length_threshold ~percentage_threshold ~q else begin if !debug_image_processing then Printf.printf "no size reduction\n%!" - end + end; + close_in result end else begin Printf.printf "external process failed\n%!" end;