Skip to content

Commit

Permalink
src: fix size underflow in CallbackQueue
Browse files Browse the repository at this point in the history
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax authored and codebytere committed Aug 11, 2020
1 parent c4d373b commit 3132878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/callback_queue-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ CallbackQueue<R, Args...>::Shift() {
head_ = ret->get_next();
if (!head_)
tail_ = nullptr; // The queue is now empty.
size_--;
}
size_--;
return ret;
}

Expand Down

0 comments on commit 3132878

Please sign in to comment.