[vlc-commits] direct3d11: fix leak when given improper data

Steve Lhomme git at videolan.org
Fri Aug 11 13:15:39 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Aug 11 11:46:42 2017 +0200| [ab6f5f4e6b791910b2fcf9c3f4dc6f1a54069eed] | committer: Hugo Beauzée-Luyssen

direct3d11: fix leak when given improper data

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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;
     }
 



More information about the vlc-commits mailing list