From cdf658c9858469a7ac3a9f76544a97e612f7f57b Mon Sep 17 00:00:00 2001 From: Francis Tsui Date: Wed, 3 Jul 2024 13:24:36 -0700 Subject: [PATCH] Fix use after free error. PiperOrigin-RevId: 649180234 --- sharing/thread_timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharing/thread_timer.cc b/sharing/thread_timer.cc index fa943f71..dfae6f98 100644 --- a/sharing/thread_timer.cc +++ b/sharing/thread_timer.cc @@ -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; } }