summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_expand.c')
-rw-r--r--video/filter/vf_expand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/filter/vf_expand.c b/video/filter/vf_expand.c
index db01bd4324..80503b4176 100644
--- a/video/filter/vf_expand.c
+++ b/video/filter/vf_expand.c
@@ -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;