diff options
author | Igor Makunin <igor.makunin@gmail.com> | 2022-03-03 14:39:29 +0300 |
---|---|---|
committer | Igor Makunin <igor.makunin@gmail.com> | 2022-03-03 14:39:29 +0300 |
commit | 6b2a294ae57e937a601dc14f20f2b856495c2523 (patch) | |
tree | 710081cd4165e24279ecf11242730b9122d31b14 | |
parent | ecbf59ee908f520741be4c495d9ea4b70dc50fb4 (diff) | |
download | ydb-6b2a294ae57e937a601dc14f20f2b856495c2523.tar.gz |
KIKIMR-14440: fix leak
ref:840c809e43610aeb9cccf3f1efafefba6ed6f378
-rw-r--r-- | ydb/core/engine/mkql_engine_flat_extfunc.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ydb/core/engine/mkql_engine_flat_extfunc.cpp b/ydb/core/engine/mkql_engine_flat_extfunc.cpp index 414d3aeeb45..51e79ad54e4 100644 --- a/ydb/core/engine/mkql_engine_flat_extfunc.cpp +++ b/ydb/core/engine/mkql_engine_flat_extfunc.cpp @@ -576,17 +576,17 @@ namespace { { TUnboxedValueVector values; if (localReadCallables.contains(callable.GetUniqueId())) { - values.push_back(PerformLocalSelectRange(callable, *host, ctx.HolderFactory, ctx.Env)); + values.emplace_back(PerformLocalSelectRange(callable, *host, ctx.HolderFactory, ctx.Env)); } - auto returnType = GetActualReturnType(callable, ctx.Env, strings); - MKQL_ENSURE(returnType->IsStruct(), "Expected struct type"); - TValuePacker valuePacker(false, returnType); - auto resultIt = results.find(callable.GetUniqueId()); if (resultIt != results.end()) { + auto returnType = GetActualReturnType(callable, ctx.Env, strings); + MKQL_ENSURE(returnType->IsStruct(), "Expected struct type"); + TValuePacker valuePacker(false, returnType); + for (auto& result : resultIt->second) { - values.push_back(valuePacker.Unpack(result, ctx.HolderFactory)); + values.emplace_back(valuePacker.Unpack(result, ctx.HolderFactory)); } } |