[vlc-commits] dvdread: fix use after free on error (refs #6594)

Rémi Denis-Courmont git at videolan.org
Mon Apr 9 22:00:14 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr  9 22:59:54 2012 +0300| [9ad094db2b47d5b57f5f8ac53c4a2848b3bffac7] | committer: Rémi Denis-Courmont

dvdread: fix use after free on error (refs #6594)

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

 modules/access/dvdread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index d565279..d0c2bff 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -231,9 +231,9 @@ static int Open( vlc_object_t *p_this )
     DemuxTitles( p_demux, &p_sys->i_angle );
     if( DvdReadSetArea( p_demux, 0, 0, p_sys->i_angle ) != VLC_SUCCESS )
     {
-        Close( p_this );
         msg_Err( p_demux, "DvdReadSetArea(0,0,%i) failed (can't decrypt DVD?)",
                  p_sys->i_angle );
+        Close( p_this );
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list