[vlc-devel] [PATCH] playlist: fix missing NULL test
Steve Lhomme
robux4 at videolabs.io
Thu Nov 17 09:39:03 CET 2016
--
replaces https://patches.videolan.org/patch/15066/
* move the NULL check
---
src/playlist/tree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 8bc560f..7dc33b1 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -68,6 +68,8 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
p_new_input = input_item_NewExt( NULL, psz_name, -1, ITEM_TYPE_NODE,
ITEM_NET_UNKNOWN );
+ if( !p_new_input )
+ return NULL;
p_item = playlist_ItemNewFromInput( p_playlist, p_new_input );
vlc_gc_decref( p_new_input );
--
2.10.1
More information about the vlc-devel
mailing list