Commit b66af2e8 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

win32: use vlc_alloc helper

parent 7195291d
...@@ -1417,7 +1417,7 @@ static int Direct3D9CreateShaders(vout_display_t *vd) ...@@ -1417,7 +1417,7 @@ static int Direct3D9CreateShaders(vout_display_t *vd)
if (length == -1 || length >= MAX_SHADER_FILE_SIZE) if (length == -1 || length >= MAX_SHADER_FILE_SIZE)
goto error; goto error;
rewind(fs); rewind(fs);
shader_source_file = malloc(sizeof(*shader_source_file) * length); shader_source_file = vlc_alloc(length, sizeof(*shader_source_file));
if (!shader_source_file) if (!shader_source_file)
goto error; goto error;
ret = fread(shader_source_file, length, 1, fs); ret = fread(shader_source_file, length, 1, fs);
......
...@@ -358,7 +358,7 @@ static void *EventThread( void *p_this ) ...@@ -358,7 +358,7 @@ static void *EventThread( void *p_this )
if( p_event->psz_title ) if( p_event->psz_title )
{ {
const size_t i_length = strlen(p_event->psz_title); const size_t i_length = strlen(p_event->psz_title);
pwz_title = malloc( 2 * (i_length + 1) ); pwz_title = vlc_alloc( i_length + 1, 2 );
if( pwz_title ) if( pwz_title )
{ {
mbstowcs( pwz_title, p_event->psz_title, 2 * i_length ); mbstowcs( pwz_title, p_event->psz_title, 2 * i_length );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment