Commit 38dccb1c authored by Yicheng Wang's avatar Yicheng Wang Committed by Facebook GitHub Bot

fix a potential nullptr deref bug in MeteredExecutor

Summary: ^

Reviewed By: yfeldblum

Differential Revision: D32895223

fbshipit-source-id: ee4f53772410dbed4440cf4cd82df02f6629d24b
parent 08d98365
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment