[vlc-commits] D3D11: fix leaks

Jean-Baptiste Kempf git at videolan.org
Thu May 12 16:12:12 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 12 16:11:50 2016 +0200| [6aab0169fa6797d6c7c2dbb29e9d6bd6cb7d20a4] | committer: Jean-Baptiste Kempf

D3D11: fix leaks

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

 modules/video_output/win32/direct3d11.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f01ed96..08c6666 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -283,7 +283,7 @@ static int Open(vlc_object_t *object)
     HINSTANCE hd3dcompiler_dll = Direct3D11LoadShaderLibrary();
     if (!hd3dcompiler_dll) {
         msg_Err(vd, "cannot load d3dcompiler.dll, aborting");
-        FreeLibrary(hd3d11_dll);
+        Direct3D11Destroy(vd);
         return VLC_EGENERIC;
     }
 
@@ -291,6 +291,7 @@ static int Open(vlc_object_t *object)
     HINSTANCE hdxgi_dll = LoadLibrary(TEXT("DXGI.DLL"));
     if (!hdxgi_dll) {
         msg_Warn(vd, "cannot load dxgi.dll, aborting");
+        Direct3D11Destroy(vd);
         return VLC_EGENERIC;
     }
 # endif



More information about the vlc-commits mailing list