diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 7f40a54a1be4e1..9fdd6fb8f44c11 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -269,7 +269,7 @@ - (void)peripheral:(CBPeripheral *)peripheral std::is_sameMaxDataLength()), uint16_t>::value, "Unexpected type for max data length"); msgBuf->SetDataLength(static_cast(characteristic.value.length)); - if (!_mBleLayer->HandleIndicationReceived((__bridge void *) peripheral, &svcId, &charId, msgBuf.Release_ForNow())) { + if (!_mBleLayer->HandleIndicationReceived((__bridge void *) peripheral, &svcId, &charId, std::move(msgBuf))) { // since this error comes from device manager core // we assume it would do the right thing, like closing the connection ChipLogError(Ble, "Failed at handling incoming BLE data");