[vlc-commits] playlist/ram: fix item creation not checked

Thomas Guillem git at videolan.org
Sun Apr 17 07:30:06 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Apr 17 08:29:49 2016 +0300| [42fc8890030ae4023acc552c6141be319cfec4c1] | committer: Thomas Guillem

playlist/ram: fix item creation not checked

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42fc8890030ae4023acc552c6141be319cfec4c1
---

 modules/demux/playlist/ram.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/playlist/ram.c b/modules/demux/playlist/ram.c
index 3e5b9f7..1820b48 100644
--- a/modules/demux/playlist/ram.c
+++ b/modules/demux/playlist/ram.c
@@ -339,6 +339,11 @@ static int Demux( demux_t *p_demux )
             /* Create the input item and pump in all the options into playlist item */
             p_input = input_item_NewExt( psz_mrl, psz_title, i_duration,
                                          ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN );
+            if( !p_input )
+            {
+                free( psz_mrl );
+                goto error;
+            }
             input_item_AddOptions( p_input, i_options, ppsz_options, 0 );
 
             if( !EMPTY_STR( psz_artist ) ) input_item_SetArtist( p_input, psz_artist );



More information about the vlc-commits mailing list