[vlc-devel] [PATCH] direct3d11: fix leak when given improper data
Steve Lhomme
robux4 at videolabs.io
Fri Aug 11 11:46:42 CEST 2017
---
modules/video_chroma/d3d11_surface.c | 1 +
modules/video_output/win32/d3d11_adjust.c | 1 +
modules/video_output/win32/d3d11_deinterlace.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/modules/video_chroma/d3d11_surface.c b/modules/video_chroma/d3d11_surface.c
index 2e9ab8d5cc..aa4da34ac0 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -695,6 +695,7 @@ static int OpenFromCPU( vlc_object_t *obj )
if (!peek->p_sys)
{
msg_Dbg(p_filter, "D3D11 opaque without a texture");
+ picture_Release(peek);
return VLC_EGENERIC;
}
diff --git a/modules/video_output/win32/d3d11_adjust.c b/modules/video_output/win32/d3d11_adjust.c
index f569e64583..3efc83245a 100644
--- a/modules/video_output/win32/d3d11_adjust.c
+++ b/modules/video_output/win32/d3d11_adjust.c
@@ -318,6 +318,7 @@ static int Open(vlc_object_t *obj)
if (!dst->p_sys)
{
msg_Dbg(filter, "D3D11 opaque without a texture");
+ picture_Release(dst);
return VLC_EGENERIC;
}
diff --git a/modules/video_output/win32/d3d11_deinterlace.c b/modules/video_output/win32/d3d11_deinterlace.c
index 828231852e..4d19b6152f 100644
--- a/modules/video_output/win32/d3d11_deinterlace.c
+++ b/modules/video_output/win32/d3d11_deinterlace.c
@@ -290,6 +290,7 @@ static int Open(vlc_object_t *obj)
if (!dst->p_sys)
{
msg_Dbg(filter, "D3D11 opaque without a texture");
+ picture_Release(dst);
return VLC_EGENERIC;
}
--
2.12.1
More information about the vlc-devel
mailing list