aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinnokentii <innokentii@yandex-team.com>2023-06-02 22:46:43 +0300
committerinnokentii <innokentii@yandex-team.com>2023-06-02 22:46:43 +0300
commita4c33bffc209d4f4778dab08227b59b980cbd6f3 (patch)
tree3a55b51787238463a39105fa08e101d3537ec74d
parent9eeab8bb8f3ad6f66a71c4b4ff3c2990d9d99367 (diff)
downloadydb-a4c33bffc209d4f4778dab08227b59b980cbd6f3.tar.gz
Fix leak on metadata replace
fix leak
-rw-r--r--library/cpp/yaml/fyamlcpp/fyamlcpp.cpp3
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) {