aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-10-15 10:03:46 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-10-15 10:19:22 +0300
commit63a4f7ddaf3654d68f0e0d194caac118eeb554cf (patch)
tree397080d2a165e8378f61771587eb6b968bc4850b
parent2a0406557d820938479cbc641cb21b3bddf22759 (diff)
downloadydb-63a4f7ddaf3654d68f0e0d194caac118eeb554cf.tar.gz
KIKIMR-19704:fix use after free
-rw-r--r--ydb/core/tx/columnshard/columnshard_impl.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp
index 02440466d59..48ffe04e952 100644
--- a/ydb/core/tx/columnshard/columnshard_impl.cpp
+++ b/ydb/core/tx/columnshard/columnshard_impl.cpp
@@ -675,12 +675,13 @@ private:
protected:
virtual bool DoExecute() override {
NActors::TLogContextGuard g(NActors::TLogContextBuilder::Build(NKikimrServices::TX_COLUMNSHARD)("tablet_id", TabletId)("parent_id", ParentActorId));
- auto guard = TxEvent->PutResult->StartCpuGuard();
-
- NOlap::TConstructionContext context(TxEvent->IndexInfo, Counters);
- Y_ABORT_UNLESS(TxEvent->IndexChanges->ConstructBlobs(context).Ok());
- if (!TxEvent->IndexChanges->GetWritePortionsCount()) {
- TxEvent->SetPutStatus(NKikimrProto::OK);
+ {
+ auto guard = TxEvent->PutResult->StartCpuGuard();
+ NOlap::TConstructionContext context(TxEvent->IndexInfo, Counters);
+ Y_ABORT_UNLESS(TxEvent->IndexChanges->ConstructBlobs(context).Ok());
+ if (!TxEvent->IndexChanges->GetWritePortionsCount()) {
+ TxEvent->SetPutStatus(NKikimrProto::OK);
+ }
}
TActorContext::AsActorContext().Send(ParentActorId, std::move(TxEvent));
return true;