mirror of
https://github.com/mpv-player/mpv
synced 2024-12-11 09:25:56 +00:00
vf_expand: fix memory leak on memory allocation failure
Isn't it ironic.
This commit is contained in:
parent
055720fbce
commit
25c8bf8754
@ -113,8 +113,10 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
|
|||||||
return mpi;
|
return mpi;
|
||||||
|
|
||||||
struct mp_image *dmpi = vf_alloc_out_image(vf);
|
struct mp_image *dmpi = vf_alloc_out_image(vf);
|
||||||
if (!dmpi)
|
if (!dmpi) {
|
||||||
|
talloc_free(mpi);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
mp_image_copy_attributes(dmpi, mpi);
|
mp_image_copy_attributes(dmpi, mpi);
|
||||||
|
|
||||||
struct mp_image cropped = *dmpi;
|
struct mp_image cropped = *dmpi;
|
||||||
|
Loading…
Reference in New Issue
Block a user