]> git.sesse.net Git - vlc/blobdiff - modules/control/rc.c
Replace argument = realloc( argument, size ); with realloc_or_free() in modules/...
[vlc] / modules / control / rc.c
index 2baa832c4b27aea7d431ef73f1a5e74db010de4f..cf69965ac698c5bc97f7530a82355344a11f98d9 100644 (file)
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
+#include <vlc_memory.h>
 
 #include <errno.h>                                                 /* ENOMEM */
 #include <ctype.h>
@@ -2106,7 +2109,9 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
         else if( *psz_item )
         {
             i_options++;
-            ppsz_options = realloc( ppsz_options, i_options * sizeof(char *) );
+            ppsz_options = realloc_or_free( ppsz_options,
+                                            i_options * sizeof(char *) );
+            assert( ppsz_options );
             ppsz_options[i_options - 1] = &psz_item[1];
         }