[vlc-devel] commit: Check malloc return value. ( Rémi Duraffort )
git version control
git at videolan.org
Sun Aug 17 21:50:13 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Aug 17 20:00:45 2008 +0200| [14a2f2e66d4899de9f5f2e3b418c4564f7ef7aae] | committer: Rémi Duraffort
Check malloc return value.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=14a2f2e66d4899de9f5f2e3b418c4564f7ef7aae
---
modules/stream_out/standard.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index d9d85fa..22a673b 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -498,10 +498,12 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
sout_stream_id_t *id;
id = malloc( sizeof( sout_stream_id_t ) );
+ if( !id )
+ return NULL;
+
if( ( id->p_input = sout_MuxAddStream( p_sys->p_mux, p_fmt ) ) == NULL )
{
free( id );
-
return NULL;
}
More information about the vlc-devel
mailing list