Check malloc return value
authorRafaël Carré <funman@videolan.org>
Tue, 6 May 2008 11:11:23 +0000 (13:11 +0200)
committerRafaël Carré <funman@videolan.org>
Tue, 6 May 2008 11:11:48 +0000 (13:11 +0200)
src/stream_output/stream_output.c

index a8e0f77..ea5bee8 100644 (file)
@@ -214,6 +214,7 @@ sout_packetizer_input_t *sout_InputNew( sout_instance_t *p_sout,
 
     /* *** create a packetizer input *** */
     p_input         = malloc( sizeof( sout_packetizer_input_t ) );
+    if( !p_input )  return NULL;
     p_input->p_sout = p_sout;
     p_input->p_fmt  = p_fmt;