Fix use after free error.

PiperOrigin-RevId: 649180234
This commit is contained in:
Francis Tsui
2024-07-03 13:26:07 -07:00
committed by Copybara-Service
parent 069d836793
commit cdf658c985
+1 -1
View File
@@ -61,8 +61,8 @@ void ThreadTimer::Cancel() {
if (run_cnt_->fetch_add(1) > 0) {
// Timer has already fired, delete the run_cnt.
delete run_cnt_;
run_cnt_ = nullptr;
}
run_cnt_ = nullptr;
}
}