Skip to content

Commit

Permalink
src: guard against nullptr deref in TimerWrapHandle::Stop
Browse files Browse the repository at this point in the history
Refs: #34454

PR-URL: #34460
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: David Carlier <[email protected]>
  • Loading branch information
addaleax authored and targos committed May 1, 2021
1 parent cf2475c commit b1d5160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/timer_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ TimerWrapHandle::TimerWrapHandle(
}

void TimerWrapHandle::Stop() {
return timer_->Stop();
if (timer_ != nullptr)
return timer_->Stop();
}

void TimerWrapHandle::Close() {
Expand Down

0 comments on commit b1d5160

Please sign in to comment.