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

Fix memory leak (CID 91)

parent 56cd4c09
......@@ -105,7 +105,11 @@ libvlc_instance_t * libvlc_new( int argc, char **argv,
VLC_OBJECT_PLAYLIST, FIND_CHILD );
p_new->p_vlm = NULL;
if( !p_new->p_playlist ) RAISENULL( "Playlist creation failed" );
if( !p_new->p_playlist )
{
libvlc_destroy( p_new );
RAISENULL( "Playlist creation failed" );
}
p_new->i_vlc_id = i_vlc_id;
return p_new;
......
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