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 <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
  • Loading branch information
addaleax authored and cjihrig committed Jul 22, 2020
1 parent 009972c commit fe69e1e
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 fe69e1e

Please sign in to comment.