diff --git a/velox/common/memory/tests/MockSharedArbitratorTest.cpp b/velox/common/memory/tests/MockSharedArbitratorTest.cpp index e094223c8847..e179b0039e2a 100644 --- a/velox/common/memory/tests/MockSharedArbitratorTest.cpp +++ b/velox/common/memory/tests/MockSharedArbitratorTest.cpp @@ -951,7 +951,7 @@ TEST_F(MockSharedArbitrationTest, ensureMemoryPoolMaxCapacity) { auto requestorOp = addMemoryOp(requestor, testData.isReclaimable); requestorOp->allocate(testData.allocatedBytes); std::shared_ptr other; - MockMemoryOperator* otherOp; + MockMemoryOperator* otherOp = nullptr; if (testData.hasOtherTask) { other = addTask(); otherOp = addMemoryOp(other, true);