parser BUGFIX inout statemets cannot be defined empty
Fixes #988
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 32dec31..997be07 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -2419,6 +2419,11 @@
subelems_deallocator(12, subelems);
LY_CHECK_RET(ret);
+ if (!inout_meta->inout_p->data) {
+ LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_MISSTMT, "data-def-stmt", ly_stmt2str(inout_kw));
+ return LY_EVALID;
+ }
+
/* finalize parent pointers to the reallocated items */
LY_CHECK_RET(lysp_parse_finalize_reallocated((struct lys_parser_ctx *)ctx, inout_meta->inout_p->groupings, NULL, NULL, NULL));