[vlc-commits] stream_demux: fix memory leak on error

Rémi Denis-Courmont git at videolan.org
Sun Jul 26 11:00:48 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 26 11:43:35 2015 +0300| [be016630400a7fe0bd09d590c2adad1a76c5b944] | committer: Rémi Denis-Courmont

stream_demux: fix memory leak on error

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

 src/input/stream_demux.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index 9457ecd..484a230 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -82,6 +82,7 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
     s->p_sys = p_sys = malloc( sizeof( *p_sys) );
     if( !s->psz_path || !s->p_sys )
     {
+        free( p_sys );
         stream_CommonDelete( s );
         return NULL;
     }



More information about the vlc-commits mailing list