mirror of https://github.com/mpv-player/mpv
video/image_writer: fix file leak in error path
regression from de7f4fb1e
This commit is contained in:
parent
6461fb9c44
commit
6b76000f0b
|
@ -270,6 +270,7 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image,
|
||||||
cinfo.client_data = &error_return_jmpbuf;
|
cinfo.client_data = &error_return_jmpbuf;
|
||||||
if (setjmp(cinfo.client_data)) {
|
if (setjmp(cinfo.client_data)) {
|
||||||
jpeg_destroy_compress(&cinfo);
|
jpeg_destroy_compress(&cinfo);
|
||||||
|
fclose(fp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue