server session BUGFIX validate data before passing them into reply
@@ -401,7 +401,7 @@ nc_clb_default_get_schema(struct lyd_node *rpc, struct nc_session *UNUSED(sessio
data = lyd_new_path(NULL, server_opts.ctx, "/ietf-netconf-monitoring:get-schema/data", model_data,
LYD_ANYDATA_STRING, LYD_PATH_OPT_OUTPUT);
- if (!data) {
+ if (!data || lyd_validate(&data, LYD_OPT_RPCREPLY, NULL)) {
ERRINT;
free(model_data);
return NULL;
