Commit 88dbb25a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Handle failed allocation

(I don't remember why I coded that, but it was left in my trunk)
parent f378f0d6
......@@ -256,12 +256,18 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist, int i_view,
playlist_item_t *p_item = (playlist_item_t *)malloc(
sizeof( playlist_item_t ) );
vlc_value_t val;
playlist_add_t *p_add = (playlist_add_t*)malloc( sizeof(playlist_add_t));
playlist_add_t *p_add;
if( p_item == NULL )
{
return NULL;
}
p_add = (playlist_add_t*)malloc( sizeof(playlist_add_t) );
if( p_add == NULL )
{
free( p_item );
return NULL;
}
vlc_input_item_Init( VLC_OBJECT(p_playlist), &p_item->input );
if( psz_name != NULL )
......
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