]> git.sesse.net Git - vlc/blobdiff - modules/demux/nuv.c
Replace argument = realloc( argument, size ); with realloc_or_free() in modules/...
[vlc] / modules / demux / nuv.c
index d32c6712a8f5dedab4c96ae6fb1d4fdc70de8a2c..31abc9765dabec184f94fa52bee09f3d3371c01e 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
+#include <vlc_memory.h>
 
 /* TODO:
  *  - test
@@ -923,8 +924,9 @@ static void demux_IndexAppend( demux_index_t *p_idx,
         else
         {
             p_idx->i_idx_max += 1000;
-            p_idx->idx = realloc( p_idx->idx,
-                                  p_idx->i_idx_max*sizeof(demux_index_entry_t));
+            p_idx->idx = realloc_or_free( p_idx->idx,
+                                p_idx->i_idx_max*sizeof(demux_index_entry_t));
+            assert( p_idx->idx );
         }
     }