From 6b76000f0b2ae6d1755b0aa9599236145a4a2524 Mon Sep 17 00:00:00 2001 From: NRK Date: Mon, 10 Jul 2023 17:59:49 +0600 Subject: [PATCH] video/image_writer: fix file leak in error path regression from de7f4fb1e --- video/image_writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/video/image_writer.c b/video/image_writer.c index b3bfd31602..a61455d6f3 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -270,6 +270,7 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, cinfo.client_data = &error_return_jmpbuf; if (setjmp(cinfo.client_data)) { jpeg_destroy_compress(&cinfo); + fclose(fp); return false; }