commit | 82fa8d4381f3ca72a56865225eb8c7a06226ee67 | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Sat Jul 11 22:00:59 2020 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Sat Jul 11 22:00:59 2020 +0200 |
tree | cc276c5b6763ed96b6b582cc3c810a9a2a6b9ec4 | |
parent | e6323f66f52945e29a265480d32af6ac2f2e5ae5 [diff] [blame] |
trees BUGFIX checking failure of the called functions
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c index c5f3a79..e11815b 100644 --- a/src/tree_data_helpers.c +++ b/src/tree_data_helpers.c
@@ -256,6 +256,7 @@ case LYD_ANYDATA_LYB: if (value->mem) { len = lyd_lyb_data_length(value->mem); + LY_CHECK_RET(len == -1, LY_EINVAL); t->value.mem = malloc(len); LY_CHECK_ERR_RET(!t->value.mem, LOGMEM(LYD_NODE_CTX(trg)), LY_EMEM); memcpy(t->value.mem, value->mem, len);