]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/xcommon.c
Check malloc return value when needed and don't print an error when such error happend.
[vlc] / modules / video_output / x11 / xcommon.c
index 3560352414ce85b9ecc78ccfd3e9b59d3c45bc09..be72fc9bb0620f86f8939267d09d07a9aa1d7669 100644 (file)
@@ -206,10 +206,7 @@ int Activate ( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     vlc_mutex_init( &p_vout->p_sys->lock );
 
@@ -2942,10 +2939,7 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
     p_data = malloc( i_bytes_per_line * i_height );
 #endif
     if( !p_data )
-    {
-        msg_Err( p_vout, "out of memory" );
         return NULL;
-    }
 
 #ifdef MODULE_NAME_IS_x11
     /* Optimize the quantum of a scanline regarding its size - the quantum is