diff --git a/system/gd/hci/acl_manager/round_robin_scheduler_test.cc b/system/gd/hci/acl_manager/round_robin_scheduler_test.cc index a16499309c1a4e503b5eaea0bde62f568d01ca11..aa01a175c3efed492698ba7b1c19c8a41be64f48 100644 --- a/system/gd/hci/acl_manager/round_robin_scheduler_test.cc +++ b/system/gd/hci/acl_manager/round_robin_scheduler_test.cc @@ -136,8 +136,9 @@ class RoundRobinSchedulerTest : public ::testing::Test { packet_count_--; if (packet_count_ == 0) { - packet_promise_->set_value(); - packet_promise_ = nullptr; + std::promise<void>* prom = packet_promise_.release(); + prom->set_value(); + delete prom; } }