data helpers BUGFIX check input
@@ -259,6 +259,8 @@ lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struc
API const char *
lyd_value_get_canonical(const struct ly_ctx *ctx, const struct lyd_value *value)
{
+ LY_CHECK_ARG_RET(ctx, ctx, value, NULL);
+
return value->_canonical ? value->_canonical :
(const char *)value->realtype->plugin->print(ctx, value, LY_VALUE_CANON, NULL, NULL, NULL);
}
