From 062d5eea3b97c625cc12b20ef84511959f7ded9f Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 28 Apr 2014 21:45:36 +0200 Subject: vf_vapoursynth: fix memory leak on error Since this leaks video images, and the player keeps feeding new images to the fitler even if it fails, this would probably have disastrous consequences. --- video/filter/vf_vapoursynth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video') diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index d9a0febc76..ccec2662cc 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -175,8 +175,10 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi) struct vf_priv_s *p = vf->priv; int ret = 0; - if (!p->out_node) + if (!p->out_node) { + talloc_free(mpi); return -1; + } if (!mpi) return 0; -- cgit v1.2.3