From: Jean-Paul Saman Date: Fri, 11 Apr 2008 08:43:04 +0000 (+0200) Subject: Check malloc return value X-Git-Tag: 0.9.0-test0~1491 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c72f2f9dcdcdb330488f01317758086f612b3044;p=vlc Check malloc return value --- diff --git a/src/misc/stats.c b/src/misc/stats.c index a922fe893c..e8f4bdd2dd 100644 --- a/src/misc/stats.c +++ b/src/misc/stats.c @@ -62,6 +62,7 @@ counter_t * __stats_CounterCreate( vlc_object_t *p_this, counter_t *p_counter = (counter_t*) malloc( sizeof( counter_t ) ) ; (void)p_this; + if( !p_counter ) return NULL; p_counter->i_compute_type = i_compute_type; p_counter->i_type = i_type; p_counter->i_samples = 0;