[vlc-devel] commit: Check malloc return value ( Rafaël Carré )

git version control git at videolan.org
Tue May 6 13:23:31 CEST 2008


vlc | branch: 0.8.6-bugfix | Rafaël Carré <funman at videolan.org> | Tue May  6 13:10:46 2008 +0200| [84630ece8e750c41a375d2bf9489acefa1bcb788]

Check malloc return value

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

 src/stream_output/stream_output.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index e0072f9..443adb8 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -2,7 +2,7 @@
  * stream_output.c : stream output module
  *****************************************************************************
  * Copyright (C) 2002-2004 the VideoLAN team
- * $Id$
+ * $Id: e0072f910c8d913573adc7836a2b893d66ae9c27 $
  *
  * Authors: Christophe Massiot <massiot at via.ecp.fr>
  *          Laurent Aimar <fenrir at via.ecp.fr>
@@ -209,6 +209,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;
 




More information about the vlc-devel mailing list