diff options
author | ildar-khisam <[email protected]> | 2023-05-12 12:58:40 +0300 |
---|---|---|
committer | ildar-khisam <[email protected]> | 2023-05-12 12:58:40 +0300 |
commit | 87107dd70ec1749d9f2042cb4baab583f5e5908f (patch) | |
tree | d88f31bb4ed37e3137b6f576f8735222bb3fac53 | |
parent | acba6a64ac762c62b3a6ef8238b58a2145ed77ca (diff) |
fix use-after-free
fix use-after-free
-rw-r--r-- | ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/impl_tracker.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/impl_tracker.h b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/impl_tracker.h index 98be271edf4..9fe0d3ae04e 100644 --- a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/impl_tracker.h +++ b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/impl_tracker.h @@ -72,6 +72,11 @@ public: }; public: + ~TImplTracker() { + // to synchronize with last Decrement() in other thread + TGuard guard(Lock); + } + std::shared_ptr<TWire> MakeTrackedWire() { return std::make_shared<TWire>(*this); } |