[vlc-commits] avformat/mux.c: Check malloc return value.

Jean-Paul Saman git at videolan.org
Wed May 2 16:32:29 CEST 2012


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Tue Apr 24 10:45:10 2012 +0200| [8fe6c20c7a040796758a684c54220a7a365b84b0] | committer: Jean-Paul Saman

avformat/mux.c: Check malloc return value.

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

 modules/demux/avformat/mux.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 5d06059..9ce5af0 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -128,6 +128,8 @@ int OpenMux( vlc_object_t *p_this )
     p_mux->pf_delstream = DelStream;
     p_mux->pf_mux       = Mux;
     p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
 
     p_sys->oc = avformat_alloc_context();
     p_sys->oc->oformat = file_oformat;



More information about the vlc-commits mailing list