playlist/directory: add missing return check
authorThomas Guillem <thomas@gllm.fr>
Wed, 2 Mar 2016 16:47:27 +0000 (17:47 +0100)
committerThomas Guillem <thomas@gllm.fr>
Mon, 4 Apr 2016 08:19:00 +0000 (10:19 +0200)
modules/demux/playlist/directory.c

index e357952..4ad4d76 100644 (file)
@@ -153,6 +153,11 @@ static int Demux( demux_t *p_demux )
 
     p_input = GetCurrentItem( p_demux );
     p_node = input_item_node_Create( p_input );
+    if( p_node == NULL )
+    {
+        input_item_Release( p_input );
+        return VLC_ENOMEM;
+    }
     p_node->b_can_loop = p_demux->p_sys->b_dir_can_loop;
     input_item_Release(p_input);