]> git.sesse.net Git - vlc/commitdiff
MSW: fix assertion failure on Open() error paths (fix #3889)
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 19 Jul 2010 17:32:55 +0000 (20:32 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 19 Jul 2010 17:32:55 +0000 (20:32 +0300)
Do not try to delete a callback and/or a mutex that do not exist.
The goto error paths still look a bit suspicious, someone should
double check them.

modules/video_output/msw/direct3d.c
modules/video_output/msw/directx.c

index c1c59568d39fe359f82aea423eab865c6e254372..14f2bc950ce110fb6caa374aa3f1fa02ac5baeef 100644 (file)
@@ -184,7 +184,10 @@ static int Open(vlc_object_t *object)
 
     return VLC_SUCCESS;
 error:
-    Close(VLC_OBJECT(vd));
+    Direct3DClose(vd);
+    CommonClean(vd);
+    Direct3DDestroy(vd);
+    free(vd->sys);
     return VLC_EGENERIC;
 }
 
index 020725a45265a9958133687eb4f2417c47100629..014a0d0b086eb627e2e2ef83c16d8a06e8c60a4d 100644 (file)
@@ -236,7 +236,11 @@ static int Open(vlc_object_t *object)
     return VLC_SUCCESS;
 
 error:
-    Close(VLC_OBJECT(vd));
+    DirectXClose(vd);
+    CommonClean(vd);
+    if (sys->hddraw_dll)
+        FreeLibrary(sys->hddraw_dll);
+    free(sys);
     return VLC_EGENERIC;
 }