]> git.sesse.net Git - vlc/blobdiff - src/extras/libc.c
Introduce realloc_or_free() to src/*, and add assert() to mark unhandled ENOMEM error...
[vlc] / src / extras / libc.c
index ada9f6e2ed1b717e3009b9e0db50ca55e141d33d..568e482d8523e1ad68e8200bb03c222ebaca2f53 100644 (file)
@@ -30,6 +30,7 @@
 #endif
 
 #include <vlc_common.h>
+#include <vlc_memory.h>
 
 #include <ctype.h>
 
@@ -865,7 +866,8 @@ int __vlc_execve( vlc_object_t *p_object, int i_argc, char *const *ppsz_argv,
               || i_read == 0 )
             break;
         *pi_data += i_read;
-        *pp_data = realloc( *pp_data, *pi_data + 1025 );
+        *pp_data = realloc_or_free( *pp_data, *pi_data + 1025 );
+        assert( *pp_data );
     }
 
     while ( !p_object->b_die