]> git.sesse.net Git - vlc/commitdiff
bluray: fix memleak in error path
authorRafaël Carré <funman@videolan.org>
Mon, 12 Aug 2013 07:40:12 +0000 (09:40 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 16 Aug 2013 10:43:13 +0000 (12:43 +0200)
modules/access/bluray.c

index f5978c437f67c4b92051c88921511f04414a25b9..f1e0305a21cb5b727e36157754d4c919ba2d745d 100644 (file)
@@ -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 );