[vlc-commits] dxva2_deinterlace: fix potential double free when there are errors

Steve Lhomme git at videolan.org
Fri Aug 4 10:16:27 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Aug  1 10:25:43 2017 +0200| [d8519941343e02688431fb296e1bfe0843e7e3ef] | committer: Jean-Baptiste Kempf

dxva2_deinterlace: fix potential double free when there are errors

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8519941343e02688431fb296e1bfe0843e7e3ef
---

 modules/video_output/win32/dxva2_deinterlace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/win32/dxva2_deinterlace.c b/modules/video_output/win32/dxva2_deinterlace.c
index f516e16042..1d5b301e19 100644
--- a/modules/video_output/win32/dxva2_deinterlace.c
+++ b/modules/video_output/win32/dxva2_deinterlace.c
@@ -351,10 +351,6 @@ static int Open(vlc_object_t *obj)
     if (FAILED(hr))
         goto error;
 
-    CoTaskMemFree(processorGUIDs);
-    picture_Release(dst);
-    IDirectXVideoProcessorService_Release(processor);
-
     sys->hdecoder_dll = hdecoder_dll;
     sys->d3d9_dll     = d3d9_dll;
     sys->decoder_caps = best_caps;
@@ -378,6 +374,10 @@ static int Open(vlc_object_t *obj)
        goto error;
     }
 
+    CoTaskMemFree(processorGUIDs);
+    IDirectXVideoProcessorService_Release(processor);
+    picture_Release(dst);
+
     filter->fmt_out.video   = out_fmt;
     filter->pf_video_filter = Deinterlace;
     filter->pf_flush        = Flush;



More information about the vlc-commits mailing list