]> git.sesse.net Git - vlc/commitdiff
vlc_arrays.h: check malloc return value.
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 2 May 2012 09:05:16 +0000 (11:05 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 2 May 2012 13:09:40 +0000 (15:09 +0200)
include/vlc_arrays.h

index 6643197707faf62a22b3ab4313676e8e40cf8355..5142158fd6b1237258d29c66ccbf27dbb3b38650 100644 (file)
@@ -507,6 +507,8 @@ vlc_dictionary_all_keys( const vlc_dictionary_t * p_dict )
     int i, count = vlc_dictionary_keys_count( p_dict );
 
     ppsz_ret = (char**)malloc(sizeof(char *) * (count + 1));
+    if( !ppsz_ret )
+        return NULL;
 
     count = 0;
     for( i = 0; i < p_dict->i_size; i++ )