mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: guard against nullptr deref in TimerWrapHandle::Stop
Refs: https://github.com/nodejs/node/pull/34454 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -56,7 +56,8 @@ TimerWrapHandle::TimerWrapHandle(
|
||||
}
|
||||
|
||||
void TimerWrapHandle::Stop() {
|
||||
return timer_->Stop();
|
||||
if (timer_ != nullptr)
|
||||
return timer_->Stop();
|
||||
}
|
||||
|
||||
void TimerWrapHandle::Close() {
|
||||
|
||||
Reference in New Issue
Block a user