[vlc-commits] bluray: fix memleak in error path

Rafaël Carré git at videolan.org
Fri Aug 16 13:26:09 CEST 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Aug 12 09:40:12 2013 +0200| [695029cdf2c19ebc6c2152adb5d3e297c07b72ee] | committer: Rafaël Carré

bluray: fix memleak in error path

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

 modules/access/bluray.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index f5978c4..f1e0305 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1225,8 +1225,10 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
                           p_sys->psz_bd_path, meta->thumbnails[0].path ) > 0 )
             {
                 char *psz_thumburl = vlc_path2uri( psz_thumbpath, "file" );
-                if( unlikely(psz_thumburl == NULL) )
+                if( unlikely(psz_thumburl == NULL) ) {
+                    free( psz_thumbpath );
                     return VLC_ENOMEM;
+                }
 
                 vlc_meta_SetArtURL( p_meta, psz_thumburl );
                 free( psz_thumburl );



More information about the vlc-commits mailing list