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

git at videolan.org git at videolan.org
Mon Aug 9 23:34:22 CEST 2010


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

dvdread: fix memory leak.
(cherry picked from commit 829f7b9600e048c8fcdec1eb1d90ba8386ab5cc3)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 4eef5d8..6bba649 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -273,6 +273,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