From c72f2f9dcdcdb330488f01317758086f612b3044 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Fri, 11 Apr 2008 10:43:04 +0200 Subject: [PATCH] Check malloc return value --- src/misc/stats.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.2