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

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


vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Aug  9 23:15:52 2010 +0200| [210795ef5b5eac9850cce8511c0cf808bc4806fd] | committer: Rémi Duraffort 

dvdnav: fix memory leak.
(cherry picked from commit 4d79e227ff00cd77567b27b02e8847d6774029ff)

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

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

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

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 80b5b94..409d9d4 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -418,6 +418,11 @@ static void Close( vlc_object_t *p_this )
         }
     }
 
+    /* Free the array of titles */
+    for( int i = 0; i < p_sys->i_title; i++ )
+        vlc_input_title_Delete( p_sys->title[i] );
+    TAB_CLEAN( p_sys->i_title, p_sys->title );
+
     dvdnav_close( p_sys->dvdnav );
     free( p_sys );
 }



More information about the vlc-commits mailing list