schema parsers BUGFIX check return value of ly_set_add function call
diff --git a/src/parser_yang.c b/src/parser_yang.c
index ba3515a..e5dde2f 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -2560,7 +2560,7 @@
 
     /* store data for collision check */
     if (parent && !(parent->nodetype & (LYS_GROUPING | LYS_ACTION | LYS_INOUT | LYS_NOTIF))) {
-        ly_set_add(&ctx->tpdfs_nodes, parent, 0);
+        LY_CHECK_RET(ly_set_add(&ctx->tpdfs_nodes, parent, 0) == -1, LY_EMEM);
     }
 
     return ret;
diff --git a/src/parser_yin.c b/src/parser_yin.c
index d756a7a..c471631 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -1527,7 +1527,7 @@
 
     /* store data for collision check */
     if (typedef_meta->parent && !(typedef_meta->parent->nodetype & (LYS_GROUPING | LYS_ACTION | LYS_INOUT | LYS_NOTIF))) {
-        ly_set_add(&ctx->tpdfs_nodes, typedef_meta->parent, 0);
+        LY_CHECK_RET(ly_set_add(&ctx->tpdfs_nodes, typedef_meta->parent, 0) == -1, LY_EMEM);
     }
 
     return LY_SUCCESS;