Skip to content

Commit db330c2

Browse files
committed
Fix use-after-free (#25815)
1 parent dddaa2a commit db330c2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ydb/core/mind/hive/hive_events.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ struct TEvPrivate {
8989

9090
struct TEvRestartComplete : TEventLocal<TEvRestartComplete, EvRestartComplete> {
9191
TFullTabletId TabletId;
92-
TStringBuf Status;
92+
TString Status;
9393

94-
TEvRestartComplete(TFullTabletId tabletId, TStringBuf status)
94+
TEvRestartComplete(TFullTabletId tabletId, const TString& status)
9595
: TabletId(tabletId)
9696
, Status(status)
9797
{}

ydb/core/mind/hive/tablet_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ bool TTabletInfo::RestartsOften() const {
545545
return Statistics.RestartTimestampSize() >= Hive.GetTabletRestartsMaxCount();
546546
}
547547

548-
void TTabletInfo::NotifyOnRestart(TString status, TSideEffects& sideEffects) {
548+
void TTabletInfo::NotifyOnRestart(const TString& status, TSideEffects& sideEffects) {
549549
for (auto actorId : ActorsToNotifyOnRestart) {
550550
sideEffects.Send(actorId, new TEvPrivate::TEvRestartComplete(GetFullTabletId(), status));
551551
}

ydb/core/mind/hive/tablet_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ struct TTabletInfo {
310310
return std::get<NMetrics::EResource::Counter>(GetResourceCurrentValues()) > 0;
311311
}
312312

313-
void NotifyOnRestart(TString status, TSideEffects& sideEffects);
313+
void NotifyOnRestart(const TString& status, TSideEffects& sideEffects);
314314
};
315315

316316

0 commit comments

Comments
 (0)