[vlc-commits] input: add missing error check

Thomas Guillem git at videolan.org
Wed Sep 20 16:57:22 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 20 13:06:14 2017 +0200| [82682a468a6696ad3ee89fd7e7a799be0ef83c03] | committer: Thomas Guillem

input: add missing error check

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

 src/input/item.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/item.c b/src/input/item.c
index c4b3d03eef..2e14218c2a 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1665,6 +1665,8 @@ int readdir_helper_additem(struct readdir_helper *p_rdh,
     input_item_CopyOptions(p_item, p_rdh->p_node->p_item);
     p_node = input_item_node_AppendItem(p_rdh->p_node, p_item);
     input_item_Release(p_item);
+    if (p_node == NULL)
+        return VLC_ENOMEM;
 
     /* A slave can also be an item. If there is a match, this item will be
      * removed from the parent node. This is not a common case, since most



More information about the vlc-commits mailing list