commit | ab40e7e73c2ab889c7aa7b2ab561992e24b2752a | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Apr 28 17:04:24 2021 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Wed Apr 28 17:04:24 2021 +0200 |
tree | d8ba57065d964c20f55069d40bd1b3b9c8effcd8 | |
parent | 40c158c7f5ff6560fde3d77fc27a7f188e6d8123 [diff] |
data helpers BUGFIX check input
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c index e1eadf8..22c1899 100644 --- a/src/tree_data_helpers.c +++ b/src/tree_data_helpers.c
@@ -259,6 +259,8 @@ 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); }