[vlc-commits] input: add missing error check

Thomas Guillem git at videolan.org
Wed Sep 20 17:38:38 CEST 2017


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

input: add missing error check

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

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

diff --git a/src/input/item.c b/src/input/item.c
index cf56ce98f7..376cf59b08 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1665,6 +1665,8 @@ int vlc_readdir_helper_additem(struct vlc_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