vf_expand: fix memory leak on memory allocation failure

Isn't it ironic.
This commit is contained in:
wm4 2015-03-20 00:38:29 +01:00
parent 055720fbce
commit 25c8bf8754
1 changed files with 3 additions and 1 deletions

View File

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