video/image_writer: fix file leak in error path

regression from de7f4fb1e
This commit is contained in:
NRK 2023-07-10 17:59:49 +06:00 committed by sfan5
parent 6461fb9c44
commit 6b76000f0b
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}