vlc | branch: master | Rémi Duraffort <[email protected]> | Wed Dec 11 
18:46:30 2013 +0100| [daa972d9584255118f2fb9f8821ed6a9fe175780] | committer: 
Rémi Duraffort

flac: fix memory leak (cid 1048914)

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

 modules/demux/flac.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 02e6d4f..2abd1e2 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -486,7 +486,10 @@ static int  ReadMeta( demux_t *p_demux, uint8_t 
**pp_streaminfo, int *pi_streami
                 return VLC_EGENERIC;
 
             if( stream_Read( p_demux->s, NULL, 4) < 4)
+            {
+                free( *pp_streaminfo );
                 return VLC_EGENERIC;
+            }
             if( stream_Read( p_demux->s, *pp_streaminfo, STREAMINFO_SIZE ) != 
STREAMINFO_SIZE )
             {
                 msg_Err( p_demux, "failed to read STREAMINFO metadata block" );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to