[vlc-commits] screen: Fix potential use after free

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 14 15:30:37 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 11:49:18 2017 +0100| [c35a8416603e9c38ca9ba6922955ad645dfca951] | committer: Hugo Beauzée-Luyssen

screen: Fix potential use after free

CID #1402783

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

 modules/access/screen/win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/screen/win32.c b/modules/access/screen/win32.c
index d53f1a1..f491072 100644
--- a/modules/access/screen/win32.c
+++ b/modules/access/screen/win32.c
@@ -68,8 +68,8 @@ int screen_InitCapture( demux_t *p_demux )
     if( !p_data->hdc_dst )
     {
         msg_Err( p_demux, "cannot get compat device context" );
-        free( p_data );
         ReleaseDC( 0, p_data->hdc_src );
+        free( p_data );
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list