]> git.sesse.net Git - vlc/blobdiff - modules/misc/text_renderer.h
Replace argument = realloc( argument, size ); with realloc_or_free() in modules/...
[vlc] / modules / misc / text_renderer.h
index cddaab7127c59f54f1e342d52b799bfd4c49f055..dc0f35496f86c2c5ee8046e46964fa03b48edd1c 100644 (file)
@@ -22,6 +22,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include <vlc_memory.h>
+
 typedef struct font_stack_t font_stack_t;
 struct font_stack_t
 {
@@ -442,8 +444,7 @@ static void SetupKaraoke( xml_reader_t *p_xml_reader, uint32_t *pi_k_runs,
 
                 if( *ppi_k_durations )
                 {
-                    *ppi_k_durations = (uint32_t *)
-                        realloc( *ppi_k_durations,
+                    *ppi_k_durations = realloc_or_free( *ppi_k_durations,
                                  *pi_k_runs * sizeof( uint32_t ) );
                 }
                 else if( *pi_k_runs == 1 )
@@ -454,8 +455,7 @@ static void SetupKaraoke( xml_reader_t *p_xml_reader, uint32_t *pi_k_runs,
 
                 if( *ppi_k_run_lengths )
                 {
-                    *ppi_k_run_lengths = (uint32_t *)
-                        realloc( *ppi_k_run_lengths,
+                    *ppi_k_run_lengths = realloc_or_free( *ppi_k_run_lengths,
                                  *pi_k_runs * sizeof( uint32_t ) );
                 }
                 else if( *pi_k_runs == 1 )