diff options
author | innokentii <innokentii@yandex-team.com> | 2023-06-02 22:46:43 +0300 |
---|---|---|
committer | innokentii <innokentii@yandex-team.com> | 2023-06-02 22:46:43 +0300 |
commit | a4c33bffc209d4f4778dab08227b59b980cbd6f3 (patch) | |
tree | 3a55b51787238463a39105fa08e101d3537ec74d | |
parent | 9eeab8bb8f3ad6f66a71c4b4ff3c2990d9d99367 (diff) | |
download | ydb-a4c33bffc209d4f4778dab08227b59b980cbd6f3.tar.gz |
Fix leak on metadata replace
fix leak
-rw-r--r-- | library/cpp/yaml/fyamlcpp/fyamlcpp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp b/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp index 64e423f55d..2a6ad83a36 100644 --- a/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp +++ b/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp @@ -638,6 +638,9 @@ void TMapping::Remove(const TNodePairRef& toRemove) { ENSURE_NODE_NOT_EMPTY(Node_); ENSURE_NODE_NOT_EMPTY(toRemove); NDetail::RethrowOnError(fy_node_mapping_remove(Node_, toRemove.Pair_), Node_); + fy_node_free(fy_node_pair_key(toRemove.Pair_)); + fy_node_free(fy_node_pair_value(toRemove.Pair_)); + free(toRemove.Pair_); } TMappingIterator TMapping::Remove(const TMappingIterator& toRemove) { |