mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 23:13:18 +08:00
vf_expand: fix memory leak on memory allocation failure
Isn't it ironic.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user