[vlc-commits] commit: dvdread: fix memory leak. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Mon Aug 9 12:23:35 CEST 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Aug  9 12:23:03 2010 +0200| [829f7b9600e048c8fcdec1eb1d90ba8386ab5cc3] | committer: Rémi Duraffort 

dvdread: fix memory leak.

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

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

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 82b8194..6c81daa 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -271,6 +271,11 @@ static void Close( vlc_object_t *p_this )
         }
     }
 
+    /* Free the array of titles */
+    for( int i = 0; i < p_sys->i_titles; i++ )
+        vlc_input_title_Delete( p_sys->titles[i] );
+    TAB_CLEAN( p_sys->i_title, p_sys->titles );
+
     /* Close libdvdread */
     if( p_sys->p_title ) DVDCloseFile( p_sys->p_title );
     if( p_sys->p_vts_file ) ifoClose( p_sys->p_vts_file );



More information about the vlc-commits mailing list