[vlc-devel] [PATCH 2/6] dxva2_deinterlace: fix potential double free when there are errors
Steve Lhomme
robux4 at videolabs.io
Tue Aug 1 10:25:43 CEST 2017
---
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 494e3ee6cf..0644eca3b5 100644
--- a/modules/video_output/win32/dxva2_deinterlace.c
+++ b/modules/video_output/win32/dxva2_deinterlace.c
@@ -349,10 +349,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;
@@ -376,6 +372,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;
--
2.12.1
More information about the vlc-devel
mailing list