commit | 59512fc11c87eb451b2741446640b3a97f48d129 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Dec 09 18:13:29 2020 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Dec 11 11:54:58 2020 +0100 |
tree | 90e46b192655119059998fbd0309d810a4893a01 | |
parent | 1e0a80ab4ae1db32d3139e2e0e0b22c739ac1e18 [diff] [blame] |
data tree BUGFIX avoid freeing empty values
diff --git a/src/tree_data.c b/src/tree_data.c index 31b53b1..b809c65 100644 --- a/src/tree_data.c +++ b/src/tree_data.c
@@ -1207,7 +1207,9 @@ } /* else value changed, LY_SUCCESS */ cleanup: - type->plugin->free(LYD_CTX(term), &val); + if (val.realtype) { + type->plugin->free(LYD_CTX(term), &val); + } return ret; }