From: RĂ©mi Duraffort Date: Mon, 3 Mar 2008 12:25:05 +0000 (+0100) Subject: Check the return value of malloc. X-Git-Tag: 0.9.0-test0~2355 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e0431bc0c10adc5d969d56194a43bb5546e55b79;p=vlc Check the return value of malloc. --- diff --git a/src/playlist/thread.c b/src/playlist/thread.c index fa6534074f..8d66901f1c 100644 --- a/src/playlist/thread.c +++ b/src/playlist/thread.c @@ -62,6 +62,11 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent ) // Stats p_playlist->p_stats = (global_stats_t *)malloc( sizeof( global_stats_t ) ); + if( !p_playlist->p_stats ) + { + vlc_object_release( p_playlist ); + return; + } vlc_mutex_init( p_playlist, &p_playlist->p_stats->lock ); p_playlist->p_stats_computer = NULL;