Skip to content

Commit

Permalink
fix a potential nullptr deref bug in MeteredExecutor
Browse files Browse the repository at this point in the history
Summary: ^

Reviewed By: yfeldblum

Differential Revision: D32895223

fbshipit-source-id: ee4f53772410dbed4440cf4cd82df02f6629d24b
  • Loading branch information
Yicheng Wang authored and facebook-github-bot committed Dec 7, 2021
1 parent 08d9836 commit 38dccb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/executors/MeteredExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void MeteredExecutor::Consumer::executeIfNotEmpty() {
void MeteredExecutor::Consumer::operator()(
Task&& task, std::shared_ptr<RequestContext>&& rctx) {
if (self_.queueObserver_) {
self_.queueObserver_->onDequeued(first_->getQueueObserverPayload());
self_.queueObserver_->onDequeued(task.getQueueObserverPayload());
}
if (!first_) {
first_ = std::make_optional<Task>(std::move(task));
Expand Down

0 comments on commit 38dccb1

Please sign in to comment.