summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-07-10 17:59:49 +0600
committersfan5 <sfan5@live.de>2023-07-11 19:55:28 +0200
commit6b76000f0b2ae6d1755b0aa9599236145a4a2524 (patch)
tree5f7fe867859afd9048359f6088c68d906fcc83cf /video
parent6461fb9c44488b39f903d54f46f778987533a5a8 (diff)
downloadmpv-6b76000f0b2ae6d1755b0aa9599236145a4a2524.tar.bz2
mpv-6b76000f0b2ae6d1755b0aa9599236145a4a2524.tar.xz
video/image_writer: fix file leak in error path
regression from de7f4fb1e
Diffstat (limited to 'video')
-rw-r--r--video/image_writer.c1
1 files changed, 1 insertions, 0 deletions
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;
}