mirror of https://github.com/mpv-player/mpv
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;
|
||||
|
||||
struct mp_image *dmpi = vf_alloc_out_image(vf);
|
||||
if (!dmpi)
|
||||
if (!dmpi) {
|
||||
talloc_free(mpi);
|
||||
return NULL;
|
||||
}
|
||||
mp_image_copy_attributes(dmpi, mpi);
|
||||
|
||||
struct mp_image cropped = *dmpi;
|
||||
|
|
Loading…
Reference in New Issue